-
Bug
-
Resolution: Fixed
-
P3
-
11
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8273589 | 11.0.14 | Martin Doerr | P3 | Resolved | Fixed | b01 |
JDK-8268454 | 11.0.13-oracle | Evan Whelan | P3 | Resolved | Fixed | b01 |
JDK-8269606 | 11.0.12.0.1-oracle | Fisba Samreen | P3 | Closed | Fixed | b01 |
$ uname -a
Linux seneca 5.4.0-31-generic #35-Ubuntu SMP Thu May 7 20:20:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ java -version
openjdk version "14.0.1" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 14.0.1+7)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14.0.1+7, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
An input stream provided to JavaShellToolBuilder isn't used in Java 14, confirmed working with Java 11
REGRESSION : Last worked in version 11.0.7
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Launch the provided source code, e.g. like this: "java JShellBug.java"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
On system out the usage of the provided input stream should be reported on System.out
ACTUAL -
With java 14 the "read" method of the provided input stream is never called.
---------- BEGIN SOURCE ----------
// https://bugs.openjdk.java.net/browse/JDK-8246353?jql=%20Subcomponent%20%3D%20jshell%20and%20resolution%20is%20EMPTY%20ORDER%20BY%20created%20DESC
import jdk.jshell.tool.JavaShellToolBuilder;
import java.io.*;
/*
** The provided input stream is not used with java 14.0.1
**/
public class JShellBug {
public static void main(String[] args) throws Exception {
final InputStream input = new InputStream() {
public int read() throws IOException {
System.out.println("READ CALLED");
Thread.dumpStack();
return System.in.read();
}
};
if (args.length == 0) {
JavaShellToolBuilder.builder().in(input, null).run();
} else {
JavaShellToolBuilder.builder().in(input, input).run();
}
}
}
---------- END SOURCE ----------
FREQUENCY : always
- backported by
-
JDK-8268454 JShell: No custom input (e.g. from GUI) possible with JavaShellToolBuilder
- Resolved
-
JDK-8273589 JShell: No custom input (e.g. from GUI) possible with JavaShellToolBuilder
- Resolved
-
JDK-8269606 JShell: No custom input (e.g. from GUI) possible with JavaShellToolBuilder
- Closed
- csr for
-
JDK-8265966 JShell: No custom input (e.g. from GUI) possible with JavaShellToolBuilder
- Closed
- duplicates
-
JDK-8260680 PipedOutputStream.write in a JShell throws error "pipe closed"
- Closed
- relates to
-
JDK-8260680 PipedOutputStream.write in a JShell throws error "pipe closed"
- Closed
- links to
-
Commit openjdk/jdk11u-dev/1e6682a7
-
Commit openjdk/jdk/2c8e94f6
-
Review openjdk/jdk11u-dev/319
-
Review openjdk/jdk/2509