efegokdemir opened a new pull request, #196: URL: https://github.com/apache/maven-toolchains-plugin/pull/196
## Summary Fixes #191. JDK discovery currently dereferences a null model when an installed JDK cannot report `java.version`, causing discovery to discard valid JDKs as well. ## Changes - Skip invalid JDK candidates before applying flags and LTS detection. - Add a regression test using an executable fake JDK that does not report Java properties, while asserting the current JDK is still discovered. ## Testing - `JAVA_HOME=/opt/homebrew/opt/openjdk@21 mvn -Dtest=ToolchainDiscovererTest test` — passed (2 tests). - `JAVA_HOME=/opt/homebrew/opt/openjdk@21 mvn -Prun-its verify` — passed (8 integration tests). - `git diff --check` — passed. No overlapping open PR was found for issue #191 or invalid JDK discovery. AI assistance was used to investigate, implement, and test this change. The submitting human reviewed the complete diff and validation results. The submitting human acknowledges this contribution under the Apache License, Version 2.0. -- 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]
