-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 17, 21
-
Component/s: tools
-
b22
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
|---|---|---|---|---|---|---|
| JDK-8371624 | 17.0.19-oracle | Ramesh Gangadhar | P4 | Resolved | Fixed | master |
This task will add a test case for JShell crashing by running the following example code. This bug has been fixed by https://bugs.openjdk.org/browse/JDK-8292755
// Case A
@FunctionalInterface
interface RunnableWithThrowable {
void run() throws Throwable;
// You can also replace `static` with `default` and test again
static RunnableWithThrowable getInstance() {
return () -> { throw new NotExist(); };
}
}
// Case B
@FunctionalInterface
interface RunnableWithGenericException<X extends Throwable> {
void run() throws X;
static RunnableWithGenericException<?> getInstance() {
return () -> { throw new NotExist(); };
}
}
// Case A
@FunctionalInterface
interface RunnableWithThrowable {
void run() throws Throwable;
// You can also replace `static` with `default` and test again
static RunnableWithThrowable getInstance() {
return () -> { throw new NotExist(); };
}
}
// Case B
@FunctionalInterface
interface RunnableWithGenericException<X extends Throwable> {
void run() throws X;
static RunnableWithGenericException<?> getInstance() {
return () -> { throw new NotExist(); };
}
}
- backported by
-
JDK-8371624 Add an extra test for JDK-8292755
-
- Resolved
-
- relates to
-
JDK-8292755 Non-default method in interface leads to a stack overflow in JShell
-
- Resolved
-