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

compiler error messages for dup single type, single static import switched

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 8u51, 9
    • tools
    • b34
    • x86_64
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.8.0_51"
      Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
      Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      The error messages for duplicate single type import and single static import types are switched. Both indicate that the name was already defined, but by the wrong type of import.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      compile code

      Also, switch the imports and compile code (compile error message is also incorrect).


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Error message: error: a type with the same simple name is already defined by the single-type-import of Double
      ACTUAL -
      Error message: error: a type with the same simple name is already defined by the static single-type-import of Double

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.geom.Line2D.Double;
      import static java.awt.geom.Path2D.Double;

      public class Test {
      }

      ---------- END SOURCE ----------

            jlahoda Jan Lahoda
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: