CAMEL-23358 - Adapt SSLContextParametersTest.testSignatureSchemesFilter for JDK 26#24734
CAMEL-23358 - Adapt SSLContextParametersTest.testSignatureSchemesFilter for JDK 26#24734apupier wants to merge 1 commit into
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
for JDK 26 The method getSignatureSchemes is now providing a non-empty list. Consequently, the tests need to be adapted. I choose to create a dedicated test to see a bit clearer the difference with previous JDK version. Signed-off-by: Aurélien Pupier <apupier@ibm.com>
83e6698 to
2321f4c
Compare
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 23 tested, 0 compile-only — current: 0 all testedMaveniverse Scalpel detected 23 affected modules (current approach: 0).
|
gnodet
left a comment
There was a problem hiding this comment.
Clean test adaptation for the JDK 26 behavioral change.
Context:
Starting with JDK 26, SSLParameters.getSignatureSchemes() returns a non-null array by default (previously returned null on JDK 21-25). This breaks the existing testSignatureSchemesFilter which assumed null defaults.
The fix:
- Caps the existing test at
max = JRE.JAVA_25so it only runs where the null-default assumption holds - Adds a parallel
testSignatureSchemesFilter_postJDK26()for JDK 26+ with updated assertions:- Default schemes are
assertNotNull(not null like pre-26) - Captures
defaultSignatureSchemeNumberfor later comparison - Empty filter → 0 schemes (same behavior)
- Explicit schemes override filter → 4 schemes (same behavior)
.*filter → all defaults preserved (verified against captured count)
- Default schemes are
- The adjacent
testSignatureSchemesDoNotAffectOtherSettingstest keepsmin = JAVA_21with no max — correctly unaffected by the null/non-null default change
Checklist:
- CI: ✅ both JDK 17 and JDK 25 builds pass
- Commit convention: JIRA-linked (
CAMEL-23358) - Test-only change, no production code modified
- Forward-compatible — ready for JDK 26 builds
Reviewed with oss-review on behalf of gnodet. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
oscerd
left a comment
There was a problem hiding this comment.
LGTM. Correct JDK-26 forward-compat split: on JDK 26 SSLParameters.getSignatureSchemes() returns non-null by default (unlike ≤ JDK 25), so capping the existing null-expecting test at JRE.JAVA_25 and adding testSignatureSchemesFilter_postJDK26 for the new behaviour is the right approach. The new variant still exercises the meaningful cases — empty filter → 0 schemes, explicit schemes override the filter, and a .* filter preserves the JDK default count. Test-only.
Reviewed with Claude Code on behalf of Andrea Cosentino. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
for JDK 26
The method getSignatureSchemes is now providing a non-empty list. Consequently, the tests need to be adapted. I choose to create a dedicated test to see a bit clearer the difference with previous JDK version.
Description
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.AI-assisted contributions
Co-authored-bytrailers) and the PR description identifies the AI tool used.