Details
-
Documentation
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
This seems like a bug (but it could just be a clarification in the documentation). And it seems related to GROOVY-3548, GROOVY-3549, GROOVY-8152, GROOVY-8153, and GROOVY-8154.
System.currentTimeMillis() is your typical static call.
System.getClass().currentTimeMillis() results in a MissingMethodException, as it should.
However, System.class.currentTimeMillis() and def sys = System.class; sys.currentTimeMillis() both compile and execute fine. I would expect a MissingMethodException for these as well.
Is there some trick where methodMissing on class instance can find the static method or something? My Java experience says no currentTimeMillis method on Class.