JDK-8012434 : Regression : Cannot define variable name which is the same to inner class name in JDK5u25
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0u25
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_7
  • CPU: x86
  • Submitted: 2013-04-17
  • Updated: 2013-08-26
  • Resolved: 2013-05-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0u55 b01Fixed
Related Reports
Relates :  
Description
.java file can not define variable name which is the same to the innerclass name.

TEST PROGRAM:
---
class RegInnerClass
{
  static class X { }
  X X = new X();
}
---

REPRODUCE:
1. Compile the above test case
2. Run  "javac class RegInnerClass"

C:\Users\licensees\javac-regression-5u25>javac -J-Duser.language=en RegInnerClass.java
RegInnerClass.java:4: RegInnerClass.X is already defined in RegInnerClass
  X X = new X();
    ^
1 error

NOTE:
This occurs in jdk5u25( and later jdk5ux), but not in JDK5u24(and former jdk5ux), jdk6ux, jdk7ux and jdk8b83.
This seems regression in jdk5u25.

Comments
Verified 5.0u55 b03 linux
05-08-2013

Apparently, regression from 6955829.
04-05-2013