Eric Milles created GROOVY-10861:
------------------------------------

             Summary: ListHashMap is not thread-safe
                 Key: GROOVY-10861
                 URL: https://issues.apache.org/jira/browse/GROOVY-10861
             Project: Groovy
          Issue Type: Bug
            Reporter: Eric Milles


{{org.codehaus.groovy.util.ListHashMap}} is used for AST node metadata.  It is 
not thread-safe when managing the low-size parallel arrays and size counter.  
If a tool is causing insertion and removal of the same node -- one example of 
this is in 
{{StaticTypesMethodReferenceExpressionWriter#writeMethodReferenceExpression}} 
which stuffs some state in a {{MethodNode}} -- in multiple threads the arrays 
can get out-of-sync.  This resulted in {{NullPointerExceptions}} for me.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to