-
Bug
-
Resolution: Fixed
-
P3
-
9
-
None
-
b36
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085067 | emb-9 | Chris Hegarty | P3 | Resolved | Fixed | team |
The following test does not time out for a really really long time, when it should throw TimeoutException immediately.
public class NegativeTimeout {
public static void main(String[] args) throws Exception {
FutureTask<Void> task = new FutureTask<>( () -> { return null; } );
try {
task.get(Long.MIN_VALUE, TimeUnit.NANOSECONDS);
} catch (TimeoutException success) {}
}
}
This is already fixed in the 166CVS, and a test added:
"Fix underflow when timeout = Long.MIN_VALUE"
http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/FutureTask.java?view=log
http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/test/tck/FutureTaskTest.java?view=log
public class NegativeTimeout {
public static void main(String[] args) throws Exception {
FutureTask<Void> task = new FutureTask<>( () -> { return null; } );
try {
task.get(Long.MIN_VALUE, TimeUnit.NANOSECONDS);
} catch (TimeoutException success) {}
}
}
This is already fixed in the 166CVS, and a test added:
"Fix underflow when timeout = Long.MIN_VALUE"
http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/FutureTask.java?view=log
http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/test/tck/FutureTaskTest.java?view=log
- backported by
-
JDK-8085067 FutureTask; fix underflow when timeout = Long.MIN_VALUE
-
- Resolved
-