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

Low coverage rate of the fix of 8038023 Compiler crash: ClassCastException

XMLWordPrintable

    • generic
    • generic

      Low coverage rate of the fix of 8038023.

      Need to implement new tests to cover new code.

      Uncovered lines (marked with '-'):
      com/sun/tools/javac/jvm/ClassReader.java
      - 478 | NameAndType nt = readNameAndType(getChar(index + 3));

      - 485 | NameAndType nt = readNameAndType(getChar(index + 3));

      + 554 | Object obj = readPool(i);
      + 555 | if (obj != null && !(obj instanceof ClassSymbol))
      - 556 | throw badClassFile("bad.const.pool.entry",
      - 557 | currentClassFile.toString(),
      - 558 | "CONSTANT_Class_info", i);
      + 559 | return (ClassSymbol)obj;

      + 565 | Object obj = readPool(i);
      + 566 | if (obj != null && !(obj instanceof Name))
      - 567 | throw badClassFile("bad.const.pool.entry",
      - 568 | currentClassFile.toString(),
      - 569 | "CONSTANT_Utf8_info or CONSTANT_String_info", i);
      + 570 | return (Name)obj;
           571 | }
           572 |
           573 | /** Read name and type.
           574 | */
           575 | NameAndType readNameAndType(int i) {
      + 576 | Object obj = readPool(i);
      + 577 | if (obj != null && !(obj instanceof NameAndType))
      - 578 | throw badClassFile("bad.const.pool.entry",
      - 579 | currentClassFile.toString(),
      - 580 | "CONSTANT_NameAndType_info", i);
      + 581 | return (NameAndType)obj;

      + 1233 | NameAndType nt = readNameAndType(nextChar());

            pgovereau Paul Govereau (Inactive)
            aeremeev Andrei Eremeev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: