arturobernalg opened a new pull request, #3602:
URL: https://github.com/apache/maven-surefire/pull/3602

   SystemUtils.toJdkVersionFromReleaseFile() read a JDK's release file and 
called .replace() on properties.getProperty("JAVA_VERSION") without checking 
for null. Some JDK distributions, including certain GraalVM builds, ship a 
release file that has no JAVA_VERSION entry, so using such a JDK as a 
<toolchain> (with a different default JAVA_HOME) threw an NPE instead of 
surfacing a usable error.
   
   Every other detection failure in this method (missing release file, 
unreadable file) already falls back to returning null so the caller treats the 
JDK version as unknown; this now does the same for a present-but-incomplete 
release file.
   
   Claude-Session: https://claude.ai/code/session_01BrsHTdDq7PD1DoqeA9vs66
   
   
   Fixes #2009.
   ---
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](https://www.apache.org/licenses/LICENSE-2.0)
   check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [x] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


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