summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/runtime/BoxesRunTime.java1
-rw-r--r--src/library/scala/runtime/ObjectRef.java5
-rwxr-xr-xsrc/library/scala/runtime/VolatileObjectRef.java5
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); }
}