ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ScheduledThreadPoolExecutor.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ScheduledThreadPoolExecutor.java (file contents):
Revision 1.95 by jsr166, Wed Sep 30 20:46:47 2015 UTC vs.
Revision 1.96 by jsr166, Sat Oct 3 18:17:51 2015 UTC

# Line 565 | Line 565 | public class ScheduledThreadPoolExecutor
565                                                    TimeUnit unit) {
566          if (command == null || unit == null)
567              throw new NullPointerException();
568 <        if (period <= 0)
568 >        if (period <= 0L)
569              throw new IllegalArgumentException();
570          ScheduledFutureTask<Void> sft =
571              new ScheduledFutureTask<Void>(command,
# Line 590 | Line 590 | public class ScheduledThreadPoolExecutor
590                                                       TimeUnit unit) {
591          if (command == null || unit == null)
592              throw new NullPointerException();
593 <        if (delay <= 0)
593 >        if (delay <= 0L)
594              throw new IllegalArgumentException();
595          ScheduledFutureTask<Void> sft =
596              new ScheduledFutureTask<Void>(command,
# Line 1095 | Line 1095 | public class ScheduledThreadPoolExecutor
1095                          available.await();
1096                      else {
1097                          long delay = first.getDelay(NANOSECONDS);
1098 <                        if (delay <= 0)
1098 >                        if (delay <= 0L)
1099                              return finishPoll(first);
1100                          first = null; // don't retain ref while waiting
1101                          if (leader != null)
# Line 1128 | Line 1128 | public class ScheduledThreadPoolExecutor
1128                  for (;;) {
1129                      RunnableScheduledFuture<?> first = queue[0];
1130                      if (first == null) {
1131 <                        if (nanos <= 0)
1131 >                        if (nanos <= 0L)
1132                              return null;
1133                          else
1134                              nanos = available.awaitNanos(nanos);
1135                      } else {
1136                          long delay = first.getDelay(NANOSECONDS);
1137 <                        if (delay <= 0)
1137 >                        if (delay <= 0L)
1138                              return finishPoll(first);
1139 <                        if (nanos <= 0)
1139 >                        if (nanos <= 0L)
1140                              return null;
1141                          first = null; // don't retain ref while waiting
1142                          if (nanos < delay || leader != null)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines