diff options
author | Simon Ochsenreither <simon@ochsenreither.de> | 2013-06-23 21:27:18 +0200 |
---|---|---|
committer | Simon Ochsenreither <simon@ochsenreither.de> | 2013-06-23 21:51:00 +0200 |
commit | 59fae2e206795b939937b2c2a919bc1b78255836 (patch) | |
tree | be2f16f4c824d9912ad40cfca809553dc732ac4f | |
parent | b6bc53479984f9fc0528a8ce3f6f0b582cb4147f (diff) | |
download | scala-59fae2e206795b939937b2c2a919bc1b78255836.tar.gz scala-59fae2e206795b939937b2c2a919bc1b78255836.tar.bz2 scala-59fae2e206795b939937b2c2a919bc1b78255836.zip |
Get rid of raw types which cause unnecessary warnings
-rw-r--r-- | src/library/scala/runtime/BoxesRunTime.java | 1 | ||||
-rw-r--r-- | src/library/scala/runtime/ObjectRef.java | 5 | ||||
-rwxr-xr-x | src/library/scala/runtime/VolatileObjectRef.java | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/library/scala/runtime/BoxesRunTime.java b/src/library/scala/runtime/BoxesRunTime.java index 3504c57b48..82a3b00ac4 100644 --- a/src/library/scala/runtime/BoxesRunTime.java +++ b/src/library/scala/runtime/BoxesRunTime.java @@ -10,7 +10,6 @@ package scala.runtime; -import java.io.*; import scala.math.ScalaNumber; /** An object (static class) that defines methods used for creating, diff --git a/src/library/scala/runtime/ObjectRef.java b/src/library/scala/runtime/ObjectRef.java index c553c780a8..b34f81c9c8 100644 --- a/src/library/scala/runtime/ObjectRef.java +++ b/src/library/scala/runtime/ObjectRef.java @@ -16,8 +16,9 @@ public class ObjectRef<T> implements java.io.Serializable { public T elem; public ObjectRef(T elem) { this.elem = elem; } + @Override public String toString() { return String.valueOf(elem); } - public static <U> ObjectRef create(U e) { return new ObjectRef(e); } - public static ObjectRef zero() { return new ObjectRef(null); } + public static <U> ObjectRef<U> create(U e) { return new ObjectRef<U>(e); } + public static ObjectRef<Object> zero() { return new ObjectRef<Object>(null); } } diff --git a/src/library/scala/runtime/VolatileObjectRef.java b/src/library/scala/runtime/VolatileObjectRef.java index 9f1f3ac0cf..6063501ffb 100755 --- a/src/library/scala/runtime/VolatileObjectRef.java +++ b/src/library/scala/runtime/VolatileObjectRef.java @@ -16,8 +16,9 @@ public class VolatileObjectRef<T> implements java.io.Serializable { volatile public T elem; public VolatileObjectRef(T elem) { this.elem = elem; } + @Override public String toString() { return String.valueOf(elem); } - public static <U> VolatileObjectRef create(U e) { return new VolatileObjectRef(e); } - public static VolatileObjectRef zero() { return new VolatileObjectRef(null); } + public static <U> VolatileObjectRef<U> create(U e) { return new VolatileObjectRef<U>(e); } + public static VolatileObjectRef<Object> zero() { return new VolatileObjectRef<Object>(null); } } |