Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8210527

JShell: NullPointerException in jdk.jshell.Eval.translateExceptionStack

XMLWordPrintable

    • b27
    • x86_64
    • generic

        ADDITIONAL SYSTEM INFORMATION :
        openjdk version "11-ea" 2018-09-25
        OpenJDK Runtime Environment 18.9 (build 11-ea+26)
        OpenJDK 64-Bit Server VM 18.9 (build 11-ea+26, mixed mode)

        A DESCRIPTION OF THE PROBLEM :
        When creating an extremely large LinkedList in JShell, a NullPointerException is thrown

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        launch jshell:
        jshell -R-Xmx9G

        run the command:
        IntStream.rangeClosed(0, Integer.MAX_VALUE).mapToObj(i -> (byte) 0).collect(Collectors.toCollection(LinkedList::new))

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        either no exception occurs, or an OutOfMemoryError is reported
        ACTUAL -
        a NullPointerException occurs

              rfield Robert Field (Inactive)
              webbuggrp Webbug Group
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: