paulk-asert opened a new pull request, #2837:
URL: https://github.com/apache/groovy/pull/2837

   …zed metaclass
   
   addMetaBeanProperty, addNewInstanceMethod and addNewStaticMethod mutated an 
initialized MetaClassImpl in place with no version bump and no invalidation, so 
call-site caches kept serving the pre-change state while fresh lookups saw it — 
silently undefined behavior. Guard all three like addMetaMethod always was, 
enforcing the contract MutableMetaClass already documents: additions belong 
before initialize(); runtime changes belong on ExpandoMetaClass, whose mutation 
window lifts the guard. EMC's lazy memoization of an inherited expando property 
now runs inside that window (onSuperPropertyFoundInHierarchy mirrors 
addSuperMethodIfNotOverridden, whose addMetaMethod call was always guarded), 
keeping the two hierarchy-found hooks symmetric.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to