Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.5.4
-
None
-
Windows 2000, JDK 1.6, Groovy 1.5.4
Description
Running this in groovyconsole
public class Configuration extends java.util.Properties { } 1
yields the following error:
Exception thrown: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script9: -1: the return type is incompatible with java.lang.String getProperty(java.lang.String) in java.util.Properties. Node: org.codehaus.groovy.ast.MethodNode. At [-1:-1] @ line -1, column -1.
But when the getProperty() method is overridden the code runs fine:
public class Configuration extends java.util.Properties { String getProperty(String s) { } } 1