Details
-
Type:
Bug
-
Status:
Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0-JSR-3
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
(from the mailing list):
I wrote:
– script –
c1 = new Class[]
c2 = new Class[]
{ IllegalStateException.class }println (c1)
println (c2)
[c1, c2].each
– output –
[Ljava.lang.Class;@14da8f4
[Ljava.lang.Class;@fd68b1
Incorrect arguments to closure: CommandLine4$_run_closure1@10a2d64.
Expected: [class java.lang.Object], actual: [class java.lang.Exception,
class java.lang.Throwable]
John Wilson responded:
It's a bug ![]()
The closure code is getting confused into thinking that you are calling it with Exception.class, Throwable.class as parameters.
Issue Links
- is depended upon by
-
GROOVY-764
closures
-
- is duplicated by
-
GROOVY-886
each(){} throws NPE when called on a Java Object[], that contains String[]'s with null entries
-
Activity
Bing Ran
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | John Wilson [ tug ] |
blackdrag blackdrag
made changes -
| Link |
This issue is duplicated by |
blackdrag blackdrag
made changes -
| Link |
This issue is depended upon by |
Kim, Pilho
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Resolution | Fixed [ 1 ] | |
| Fix Version/s | 1.0-JSR-3 [ 11518 ] |