[
https://issues.apache.org/jira/browse/GROOVY-8018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King closed GROOVY-8018.
-----------------------------
Resolution: Not A Bug
Closed as per original reporter's comment
> map with default value creates entry on MissingMethodException
> --------------------------------------------------------------
>
> Key: GROOVY-8018
> URL: https://issues.apache.org/jira/browse/GROOVY-8018
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.4.5
> Reporter: dariusan
>
> Calling an inexisting method on a map with default values leads to an
> Exception and alters the content that map:
> {code}
> def map=[:].withDefault{[]}
> try{
> map.inExistingMethod()
> }catch(e){
> println e
> } finally {
> println map
> }
> {code}
> outputs the following:
> {code}
> groovy.lang.MissingMethodException: No signature of method:
> groovy.lang.MapWithDefault.inExistingMethod() is applicable for argument
> types: () values: []
> [inExistingMethod:[]]
> {code}
> where throwing an Exception is ok but not altering the content of the map
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)