Github user baybatu commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/370#discussion_r71832411
  
    --- Diff: src/main/org/codehaus/groovy/ast/VariableScope.java ---
    @@ -178,4 +178,26 @@ public Object removeReferencedClassVariable(String 
name) {
         public Iterator<Variable> getReferencedClassVariablesIterator() {
             return getReferencedClassVariables().values().iterator();
         }
    -}
    \ No newline at end of file
    +
    +    /**
    +     * Gets a map containing the variables declared in this scope.
    +     * This map cannot be modified.
    +     * @return a map containing the declared variable references
    +     */
    +    public Map<String, Variable> getDeclaredVariables() {
    --- End diff --
    
    In javadoc, it says "This map cannot be modified" but this method can 
return two type of Map implementations: HashMap (see putDeclaredVariable method 
in the same file) and UnmodifiableMap stated in 'else' block.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to