pjfanning commented on PR #125:
URL: https://github.com/apache/poi-xmlbeans/pull/125#issuecomment-5978654456

   None of the problems fixed here are recent regressions. They all go back to 
the original code:
   
   | Issue | Introduced |
   |---|---|
   | `getCurrent()` creates a stack that is never removed | b3b7d1e5 (2005) |
   | two-step `pop()` (`get` then `remove`) | initial checkin f6f24b76 (2003). 
7fe6c92a (2022) only added generics |
   | `pop()` throws on an empty stack and uses `set(null)` rather than 
`remove()` | 515b0cb2 (2005) |
   | `push` inside the `try` in `SchemaParticleImpl` / 
`SchemaLocalAttributeImpl` | initial checkin f6f24b76 (2003) |
   
   XMLBEANS-502 (d1a3f12e) added `ThreadLocalUtil.clearAllThreadLocals()` as a 
manual workaround, and left these code paths alone. The leak probably shows up 
now because the POI regression run reuses threads across millions of documents, 
uses `Thread.stop` and catches OOMs.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to