elharo opened a new pull request, #393:
URL: https://github.com/apache/maven-shared-utils/pull/393

   `Xpp3DomBuilder.createXmlReader()` clears and restores the global 
`org.xml.sax.driver` system property without synchronization (lines 119-129). 
In a multi-threaded environment like Maven parallel builds, one thread's 
clear/restore sequence interferes with other threads' reads of the same 
property. The code's own comment acknowledges: "There's a 'slight' problem with 
this an parallel maven: It does not work ;)"
   
   The method already tries to directly instantiate 
`com.sun.org.apache.xerces.internal.parsers.SAXParser` first — which succeeds 
on all Oracle/OpenJDK JVMs. The system property manipulation fallback is both 
unnecessary and harmful.
   
   **Fix:** Removed the system property manipulation entirely. If the direct 
instantiation fails, falls through to `XMLReaderFactory.createXMLReader()` 
without modifying any global state.
   
   Fixes https://github.com/apache/maven-shared-utils/issues/392


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