gnodet opened a new pull request, #21991:
URL: https://github.com/apache/camel/pull/21991

   ## Summary
   
   - Lower the minimum JDK version from 21 to 17 using Multi-Release JAR 
(MRJAR) infrastructure
   - JDK 21+ users retain all benefits (virtual threads, ScopedValue) — they 
are loaded automatically via MRJAR at runtime
   - JDK 17 users get platform threads and ThreadLocal as graceful fallbacks
   
   ## Changes
   
   - **Root `pom.xml`**: `jdk.version` 21 → 17
   - **`CamelThreadFactory`**: JDK 17 base version uses `new Thread()`. JDK 21 
version (with `Thread.ofVirtual()`/`Thread.ofPlatform()`) moved to 
`src/main/java21/` MRJAR directory in `camel-util`
   - **`JsonObject`**: Replaced `List.getLast()` (JDK 21 SequencedCollection) 
with `list.get(list.size() - 1)`, and `String.splitWithDelimiters()` (JDK 21) 
with a `Pattern`/`Matcher` equivalent
   - **`ManagedVirtualThreadExecutorTest`**: Added `@EnabledForJreRange(min = 
JAVA_21)` since it uses `Executors.newVirtualThreadPerTaskExecutor()`
   
   ## Trade-offs
   
   | Benefits | Costs |
   |----------|-------|
   | Broader adoption (JDK 17 LTS widely deployed) | Virtual threads 
unavailable on JDK 17 |
   | Lower barrier for enterprise users | ScopedValue falls back to ThreadLocal 
|
   | Aligns with JDK 17 LTS support (until Sept 2029) | CI matrix grows (17 + 
21 + 25) |
   
   ## Test plan
   
   - [ ] Full build and test on JDK 17
   - [ ] Full build and test on JDK 21 (verify MRJAR virtual threads still work)
   - [ ] Full build and test on JDK 25 (verify ScopedValue via MRJAR)
   - [ ] Verify `camel-util` JAR contains 
`META-INF/versions/21/org/apache/camel/util/concurrent/CamelThreadFactory.class`


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