harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r409670 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref: PhantomReference.java SoftReference.java
Date Fri, 26 May 2006 13:53:39 GMT
Author: tellison
Date: Fri May 26 06:53:38 2006
New Revision: 409670

URL: http://svn.apache.org/viewvc?rev=409670&view=rev
Log:
Generics uplift in java.lang.ref stubs

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/PhantomReference.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/SoftReference.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/PhantomReference.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/PhantomReference.java?rev=409670&r1=409669&r2=409670&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/PhantomReference.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/PhantomReference.java
Fri May 26 06:53:38 2006
@@ -21,7 +21,7 @@
  * 
  * @since JDK1.2
  */
-public class PhantomReference extends java.lang.ref.Reference {
+public class PhantomReference<T> extends Reference<T> {
 
 	/**
 	 * Return the referent of the reference object. Phantom reference objects
@@ -30,7 +30,7 @@
 	 * 
 	 * @return Object Returns null.
 	 */
-	public Object get() {
+	public T get() {
 		return null;
 	}
 
@@ -43,7 +43,7 @@
 	 * @param q
 	 *            queue to register to the reference object with.
 	 */
-	public PhantomReference(Object r, ReferenceQueue q) {
+	public PhantomReference(T r, ReferenceQueue<? super T> q) {
 		super();
 	}
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/SoftReference.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/SoftReference.java?rev=409670&r1=409669&r2=409670&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/SoftReference.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/SoftReference.java
Fri May 26 06:53:38 2006
@@ -21,7 +21,8 @@
  * 
  * @since JDK1.2
  */
-public class SoftReference extends java.lang.ref.Reference {
+public class SoftReference<T> extends Reference<T> {
+
 	private int age;
 
 	/**
@@ -33,7 +34,7 @@
 	 * @param q
 	 *            queue to register to the reference object with.
 	 */
-	public SoftReference(Object r, ReferenceQueue q) {
+	public SoftReference(T r, ReferenceQueue<? super T> q) {
 		initReference(r, q);
 	}
 
@@ -44,7 +45,7 @@
 	 * @param r
 	 *            referent to track.
 	 */
-	public SoftReference(Object r) {
+	public SoftReference(T r) {
 		initReference(r);
 	}
 
@@ -55,7 +56,7 @@
 	 * @return Object Referent to which reference refers, or null if object has
 	 *         been cleared.
 	 */
-	public Object get() {
+	public T get() {
 		return super.get();
 	}
 



Mime
View raw message