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

Comparing jsr166/src/main/java/util/concurrent/FutureTask.java (file contents):
Revision 1.81 by jsr166, Sat Jun 18 18:31:52 2011 UTC vs.
Revision 1.82 by jsr166, Sat Jun 18 20:22:25 2011 UTC

# Line 161 | Line 161 | public class FutureTask<V> implements Ru
161       */
162      public V get(long timeout, TimeUnit unit)
163          throws InterruptedException, ExecutionException, TimeoutException {
164 <        long nanos = unit.toNanos(timeout);
164 >        if (unit == null)
165 >            throw new NullPointerException();
166          int s = state;
167          if (s <= COMPLETING &&
168 <            (s = awaitDone(true, nanos)) <= COMPLETING)
168 >            (s = awaitDone(true, unit.toNanos(timeout))) <= COMPLETING)
169              throw new TimeoutException();
170          return report(s);
171      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines