Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0-JSR-3
-
None
-
None
-
tested on Linux
Description
Given the class
class SomeClass {
// this is the inaccessible static attribute called "Class"
public static Object Class = null;
}
if we try to access the "Class" static attribute from a Groovy script, it won't work.
An actual example is the com.hp.hpl.jena.vocabulary.OWL class in the jena.sf.net project.
Here's the test script also attached to this issue:
import com.hp.hpl.jena.vocabulary.*
println OWL.class
println OWL.Class
println OWL."Class"
println OWL.@Class
... here's the output:
class com.hp.hpl.jena.vocabulary.OWL
class java.lang.Class
class java.lang.Class
Caught: groovy.lang.MissingFieldException: No such field: Class for class: java.lang.Class
The expected behaviour would be calling OWL.Class and getting the value of the attribute.
Attachments
Attachments
Issue Links
- is related to
-
GROOVY-732 Problem accessing static fields
- Closed
- relates to
-
GROOVY-732 Problem accessing static fields
- Closed