harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r669837 - in /harmony/standard/classlib/branches/java5/modules/concurrent/src: main/java/java/util/concurrent/Delayed.java main/java/java/util/concurrent/ScheduledThreadPoolExecutor.java test/java/DelayQueueTest.java
Date Fri, 20 Jun 2008 09:22:21 GMT
Author: tellison
Date: Fri Jun 20 02:22:21 2008
New Revision: 669837

URL: http://svn.apache.org/viewvc?rev=669837&view=rev
Log:
Fix for HARMONY-5807 ([classlib][concurrent] can't 'implement Delayed' compatibly with Sun
Java)

Modified:
    harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/Delayed.java
    harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/ScheduledThreadPoolExecutor.java
    harmony/standard/classlib/branches/java5/modules/concurrent/src/test/java/DelayQueueTest.java

Modified: harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/Delayed.java
URL: http://svn.apache.org/viewvc/harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/Delayed.java?rev=669837&r1=669836&r2=669837&view=diff
==============================================================================
--- harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/Delayed.java
(original)
+++ harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/Delayed.java
Fri Jun 20 02:22:21 2008
@@ -4,6 +4,11 @@
  * http://creativecommons.org/licenses/publicdomain
  */
 
+/*
+ * Modified in Apache Harmony to comply with Java 5 signature
+ * specification.
+ */
+
 package java.util.concurrent;
 
 import java.util.*;
@@ -19,7 +24,7 @@
  * @since 1.5
  * @author Doug Lea
  */
-public interface Delayed extends Comparable {
+public interface Delayed extends Comparable<Delayed> {
 
     /**
      * Returns the delay associated with this object, in the given time unit.

Modified: harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/ScheduledThreadPoolExecutor.java
URL: http://svn.apache.org/viewvc/harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/ScheduledThreadPoolExecutor.java?rev=669837&r1=669836&r2=669837&view=diff
==============================================================================
--- harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/ScheduledThreadPoolExecutor.java
(original)
+++ harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/ScheduledThreadPoolExecutor.java
Fri Jun 20 02:22:21 2008
@@ -4,6 +4,10 @@
  * http://creativecommons.org/licenses/publicdomain
  */
 
+/*
+ * Modified in Apache Harmony.
+ */
+
 package java.util.concurrent;
 import java.util.concurrent.atomic.*;
 import java.util.*;
@@ -111,7 +115,7 @@
             return d;
         }
 
-        public int compareTo(Object other) {
+        public int compareTo(Delayed other) {
             if (other == this) // compare zero ONLY if same object
                 return 0;
             ScheduledFutureTask<?> x = (ScheduledFutureTask<?>)other;

Modified: harmony/standard/classlib/branches/java5/modules/concurrent/src/test/java/DelayQueueTest.java
URL: http://svn.apache.org/viewvc/harmony/standard/classlib/branches/java5/modules/concurrent/src/test/java/DelayQueueTest.java?rev=669837&r1=669836&r2=669837&view=diff
==============================================================================
--- harmony/standard/classlib/branches/java5/modules/concurrent/src/test/java/DelayQueueTest.java
(original)
+++ harmony/standard/classlib/branches/java5/modules/concurrent/src/test/java/DelayQueueTest.java
Fri Jun 20 02:22:21 2008
@@ -6,6 +6,10 @@
  * Pat Fisher, Mike Judd. 
  */
 
+/*
+ * Modified in Apache Harmony.
+ */
+
 import junit.framework.*;
 import java.util.*;
 import java.util.concurrent.*;
@@ -29,7 +33,7 @@
     static class PDelay implements Delayed { 
         int pseudodelay;
         PDelay(int i) { pseudodelay = Integer.MIN_VALUE + i; }
-        public int compareTo(Object y) {
+        public int compareTo(Delayed y) {
             int i = pseudodelay;
             int j = ((PDelay)y).pseudodelay;
             if (i < j) return -1;
@@ -74,7 +78,7 @@
         NanoDelay(long i) { 
             trigger = System.nanoTime() + i;
         }
-        public int compareTo(Object y) {
+        public int compareTo(Delayed y) {
             long i = trigger;
             long j = ((NanoDelay)y).trigger;
             if (i < j) return -1;



Mime
View raw message