Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-5
-
Fix Version/s: 1.0-beta-8
-
Component/s: None
-
Labels:None
-
Environment:JDK1.5 (maybe others), groovy 1.0-beta-5
-
Number of attachments :
Description
Following fails:
A.java:
===
class A {
void f(boolean b) {
}
void f(String s) {
}
}
===
a.groovy
===
A.f(null);
===
Invoked as "groovy a.groovy" it fails with
===
Caught: groovy.lang.GroovyRuntimeException: failed to invoke method: org.codehaus.groovy.runtime.ReflectionMetaMethod@80f4cb[name: f params: [boolean] returns: void owner: class A] on: class A with arguments: [null] reason: java.lang.IllegalArgumentException
groovy.lang.GroovyRuntimeException: failed to invoke method: org.codehaus.groovy.runtime.ReflectionMetaMethod@80f4cb[name: f params: [boolean] returns: void owner: class A] on: class A with arguments: [null] reason: java.lang.IllegalArgumentException
at groovy.lang.MetaClass.doMethodInvoke(MetaClass.java:1075)
...
===
A.f((String) null) should have been called.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 1.0-beta-8 [ 11255 ] | |
| Resolution | Fixed [ 1 ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |
Hi Stepan,
At present, "boolean" means "Boolean", hence the ambiguity. Hopefully we can do something about it in the future, but it's not likely to change for a while...