Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5f70c8

Browse files
committed
Merge pull request scala#2679 from soc/topic/java-rawtype-cleanup
Get rid of raw types which cause unnecessary warnings
2 parents b328eb9 + 59fae2e commit b5f70c8

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/library/scala/runtime/BoxesRunTime.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
package scala.runtime;
1212

13-
import java.io.*;
1413
import scala.math.ScalaNumber;
1514

1615
/** An object (static class) that defines methods used for creating,

src/library/scala/runtime/ObjectRef.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ public class ObjectRef<T> implements java.io.Serializable {
1616

1717
public T elem;
1818
public ObjectRef(T elem) { this.elem = elem; }
19+
@Override
1920
public String toString() { return String.valueOf(elem); }
2021

21-
public static <U> ObjectRef create(U e) { return new ObjectRef(e); }
22-
public static ObjectRef zero() { return new ObjectRef(null); }
22+
public static <U> ObjectRef<U> create(U e) { return new ObjectRef<U>(e); }
23+
public static ObjectRef<Object> zero() { return new ObjectRef<Object>(null); }
2324
}

src/library/scala/runtime/VolatileObjectRef.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ public class VolatileObjectRef<T> implements java.io.Serializable {
1616

1717
volatile public T elem;
1818
public VolatileObjectRef(T elem) { this.elem = elem; }
19+
@Override
1920
public String toString() { return String.valueOf(elem); }
2021

21-
public static <U> VolatileObjectRef create(U e) { return new VolatileObjectRef(e); }
22-
public static VolatileObjectRef zero() { return new VolatileObjectRef(null); }
22+
public static <U> VolatileObjectRef<U> create(U e) { return new VolatileObjectRef<U>(e); }
23+
public static VolatileObjectRef<Object> zero() { return new VolatileObjectRef<Object>(null); }
2324
}

0 commit comments

Comments
 (0)