Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-5
-
None
-
None
-
Windows XP Professional SP2
Sun Java JDK 1.5.0_07
Description
I was testing issues around Nested and Inner classes, and I came up with the attached Groovy script that producse unexpected output.
Actual Ouput:
In OuterClass constructor
globalVar = globalVar 1
globalVar = globalVar 1
outerClassVar = outerClassVar
Expected Output:
In OuterClass constructor
globalVar = globalVar 1
globalVar = globalVar 4
outerClassVar = outerClassVar
It appears that public static variables are not modifiable outside the class in which they are defined.