elharo opened a new issue, #392:
URL: https://github.com/apache/maven-shared-utils/issues/392

   `Xpp3DomBuilder.createXmlReader()` (lines 119-129) clears and restores the 
global `org.xml.sax.driver` system property without synchronization. In a 
multi-threaded environment (like Maven parallel builds), one thread's 
clear/restore sequence can interfere with another thread's read or write of the 
same property. The code even acknowledges this with the comment: "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 (line 114), which 
succeeds on all Oracle/OpenJDK JVMs. The system property manipulation fallback 
is both unnecessary and harmful.
   
   Fix: remove the system property manipulation. If the direct instantiation 
fails, just call `XMLReaderFactory.createXMLReader()` without modifying any 
system properties.


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