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

JShell: OutOfMemory error is not thrown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 9
    • 9
    • tools
    • None

      OutOfMemory error is not thrown in the following case:

      assertEval("import java.util.*;");
      assertEval("List<byte[]> list = new ArrayList<>();");
      assertExecuteException("while (true) { list.add(new byte[10000]); }", OutOfMemoryError.class);

      If 10000 is replaced with 100000, the error occurs.

      See ExceptionsTest#outOfMemory

            rfield Robert Field (Inactive)
            aeremeev Andrei Eremeev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: