Add an extra test for JDK-8292755

XMLWordPrintable

    • b22

        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(); };
            }
        }

              Assignee:
              Weibing Xiao
              Reporter:
              Weibing Xiao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: