vlsi opened a new pull request, #6717:
URL: https://github.com/apache/jmeter/pull/6717

   ## Why
   
   The CI matrix passes a short vendor token (such as `eclipse` for Temurin) 
for the test JDK toolchain, and the build mapped it with 
`JvmVendorSpec.matching(it)`. `matching` probes the runtime `java.vendor`, 
which Temurin reports inconsistently across versions: JDK 8 reports 
`java.vendor="Temurin"` while 11+ report `"Eclipse Adoptium"`. A plain 
`matching("eclipse")` therefore cannot resolve a Temurin 8 toolchain, and the 
same gap exists for any distribution whose vendor string differs from its 
matrix token.
   
   The current matrix only tests JDK 17/21/25/EA, so this is latent rather than 
actively failing today — but the resolution logic is wrong for the general 
case, and re-adding an older JDK would surface it.
   
   ## What
   
   - Map the known vendor tokens to Gradle's built-in `JvmVendorSpec` constants 
(`ADOPTIUM`, `AMAZON`, `AZUL`, `BELLSOFT`, `MICROSOFT`, `ORACLE`), which 
recognise every alias a distribution reports across versions; fall back to a 
substring match for anything unmapped.
   - Guard against a blank vendor (`takeIf { it.isNotBlank() }`) so an empty 
token no longer narrows the toolchain query.
   
   This mirrors 
[pgjdbc/pgjdbc#4257](https://github.com/pgjdbc/pgjdbc/pull/4257), which fixes 
the same issue in the shared 
`build-logic/basics/src/main/kotlin/configureToolchain.kt`. The new constants 
are a strict superset of the previous `matching(...)` behaviour for the 
distributions already in the matrix, so they change nothing for JDK 17+.
   
   ## How to verify
   
   `./gradlew -Prelease :build-logic:basics:compileKotlin` compiles cleanly on 
Gradle 9.2.1, which provides all of the `JvmVendorSpec` constants used here.


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