[ 
https://issues.apache.org/jira/browse/GROOVY-7467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jochen Theodorou resolved GROOVY-7467.
--------------------------------------
    Resolution: Won't Fix
      Assignee: Jochen Theodorou  (was: Cédric Champeau)

[~Vijay26] if your code is like that, then it means items will have the type 
List<Object>. Your open block though takes a Map. The compiler cannot 
guarantee, that every list element will be a Map and thus the call works. So it 
correctly fails. What you need is either change the getItems method to at least 
return a List<Map> or cast to at least List<Map>


> Expected parameter of type java.lang.Object but got java.util.Map in groovy 
> 2.3.10
> ----------------------------------------------------------------------------------
>
>                 Key: GROOVY-7467
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7467
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static compilation
>    Affects Versions: 2.3.10
>            Reporter: Vijaykumar
>            Assignee: Jochen Theodorou
>
> Expected parameter of type java.lang.Object but got java.util.Map 
> I'm getting the above exception in the groovy 2.3.10..
> I have declared the closure parameter as Map in my code. The same code is  
> working in groovy 2.2.2.
> I am upgrading groovy from 2.2.2  to 2.3.10.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to