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

Unecessary checkcast generated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P5
    • None
    • 6
    • tools
    • None
    • generic
    • generic

    Description

      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?

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: