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)

Reply via email to