Unecessary checkcast generated

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P5
    • None
    • Affects Version/s: 6
    • Component/s: tools
    • None
    • generic
    • generic

      JDK1.6 (final) compiles:

        Serializable zz = null;
        String[] ss = (String[])zz;

      to:

      201: aconst_null
      202: astore 16
      204: aload 16
      206: checkcast #54; //class "[Ljava/lang/String;"
      209: checkcast #54; //class "[Ljava/lang/String;"
      212: astore 17

      Why the double checkcast?

            Assignee:
            Wei Tao (Inactive)
            Reporter:
            Alex Buckley
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: