You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "dariusan (JIRA)" <ji...@apache.org> on 2016/12/08 12:08:58 UTC
[jira] [Created] (GROOVY-8018) map with default value creates entry
on MessingMethodExceptoin
dariusan created GROOVY-8018:
--------------------------------
Summary: map with default value creates entry on MessingMethodExceptoin
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)