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

Typecastings are duplicated in byte code

XMLWordPrintable

    • x86_64
    • linux_ubuntu

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      Any type cast is inserted twice by javac.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile the sample code.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      One type casting is present in the byte code.
      ACTUAL -
      Two type castings are present in the byte code.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
          void qux () {
              Object o = null;
              byte[] b = (byte[]) o;
          }
      ---------- END SOURCE ----------

            aefimov Aleksej Efimov
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: