-
Bug
-
Resolution: Fixed
-
P2
-
8, 9
-
b57
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084606 | emb-9 | Roger Riggs | P2 | Resolved | Fixed | team |
JDK-8245699 | openjdk8u262 | Sergey Nazarkin | P2 | Resolved | Fixed | b04 |
JDK-8241535 | 8-pool | Sergey Nazarkin | P2 | Closed | Duplicate | b04 |
JDK-8236465 | 8u251 | Ivan Gerasimov | P2 | Closed | Fixed | b01 |
JDK-8239707 | emb-8u251 | Roger Riggs | P2 | Resolved | Fixed | team |
"Throws: NullPointerException - if unit is null".
However, j.l.Process.waitFor(timeout, unit) doesn't throw NPE if timeout is less than, or equal to zero. Instead of this it returns false.
Minimized test:
---------------------------------------------------------------
public static void main(String[] args) throws IOException, InterruptedException {
System.out.println(Runtime.getRuntime().exec("java").waitFor(0, null));
System.out.println(Runtime.getRuntime().exec("java").waitFor(-50, null));
}
---------------------------------------------------------------
Output:
---------------------------------------------------------------
false
false
---------------------------------------------------------------
Tested with JDK9 b23.
Failed JCK test is under development.
- backported by
-
JDK-8084606 (process) Process.waitFor(timeout, unit) doesn't throw NPE if timeout is less than, or equal to zero when unit == null
- Resolved
-
JDK-8239707 (process) Process.waitFor(timeout, unit) doesn't throw NPE if timeout is less than, or equal to zero when unit == null
- Resolved
-
JDK-8245699 (process) Process.waitFor(timeout, unit) doesn't throw NPE if timeout is less than, or equal to zero when unit == null
- Resolved
-
JDK-8236465 (process) Process.waitFor(timeout, unit) doesn't throw NPE if timeout is less than, or equal to zero when unit == null
- Closed
-
JDK-8241535 (process) Process.waitFor(timeout, unit) doesn't throw NPE if timeout is less than, or equal to zero when unit == null
- Closed