codeconsole commented on PR #3096:
URL: https://github.com/apache/groovy/pull/3096#issuecomment-6526833129

   
   @daniellansun thanks.
   
   1. Fixed in 79028a0926. `java.lang.ClassValue`, the default store, has no 
get-if-present, so `ClassInfo` keeps the lookup itself: the global set now also 
indexes its `ClassInfo`s by class, keys and values held weakly, and that index 
replaces the map of detached instances. `ClassInfo.remove` looks the instance 
up there and never creates one; a class without a `ClassInfo` is left without 
one. `computeValue` gets a still reachable (detached) instance back from the 
same index, as before. 
`Groovy12142.testRemovingAClassWithoutClassInfoCreatesNone` checks it through 
`ClassInfo.getAllClassInfo()` and fails on the previous `ClassInfo.remove`. The 
set's queue stays as it is because Gradle's 
`ClassInfoCleaningGroovySystemLoader` reads it reflectively.
   2. The put is gone. The instance stays in the index from creation, so 
`remove` only clears the MetaClasses under the `ClassInfo` lock and then drops 
the association. A `get` before the drop sees the association; one after it 
gets the same instance back from the index.
   3. #3096 is stacked on #3095 and already contains it (merged with master). 
#3095 should merge first; #3096 then shows only its own GROOVY-12580 commits.
   
   The `lts (17, windows-latest, 1)` timeout is the same 60m Gradle step 
timeout as on #3095. `bugs.Groovy12142` and `bugs.Groovy12363` pass locally on 
JDK 17.0.20.
   
   


-- 
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