Skip to content

CAMEL-23358 - Adapt SSLContextParametersTest.testSignatureSchemesFilter for JDK 26#24734

Open
apupier wants to merge 1 commit into
apache:mainfrom
apupier:CAMEL-23358-JDK26-SSLContextParameters
Open

CAMEL-23358 - Adapt SSLContextParametersTest.testSignatureSchemesFilter for JDK 26#24734
apupier wants to merge 1 commit into
apache:mainfrom
apupier:CAMEL-23358-JDK26-SSLContextParameters

Conversation

@apupier

@apupier apupier commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

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

  • I checked that the commit is targeting the correct branch (Camel 4 uses the main branch)

Tracking

  • If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.
  • I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

AI-assisted contributions

  • If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., Co-authored-by trailers) and the PR description identifies the AI tool used.

@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions github-actions Bot added the core label Jul 15, 2026
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>
@apupier apupier force-pushed the CAMEL-23358-JDK26-SSLContextParameters branch from 83e6698 to 2321f4c Compare July 15, 2026 14:19
@apupier apupier changed the title CAMEL-23358 - Adapt SSLContextParametersTest.testSignatureSchemesFilter CAMEL-23358 - Adapt SSLContextParametersTest.testSignatureSchemesFilter for JDK 26 Jul 15, 2026
@apupier apupier requested a review from oscerd July 15, 2026 14:54
@apupier apupier marked this pull request as ready for review July 15, 2026 14:54
@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • core/camel-core

🔬 Scalpel shadow comparison — Scalpel: 23 tested, 0 compile-only — current: 0 all tested

Maveniverse Scalpel detected 23 affected modules (current approach: 0).

⚠️ Modules only in Scalpel (23)
  • camel-console
  • camel-core
  • camel-csimple-joor
  • camel-datasonnet
  • camel-groovy
  • camel-hl7
  • camel-javascript
  • camel-joor
  • camel-jq
  • camel-jsonpath
  • camel-main
  • camel-management
  • camel-mvel
  • camel-ognl
  • camel-platform-http-jolokia
  • camel-python
  • camel-saxon
  • camel-spring-xml
  • camel-stax
  • camel-xml-io-dsl
  • camel-xml-jaxb-dsl
  • camel-xml-jaxb-dsl-test-definition
  • camel-xml-jaxb-dsl-test-spring

Skip-tests mode would test 23 modules (1 direct + 22 downstream), skip tests for 0 (generated code, meta-modules)

Modules Scalpel would test (23)
  • camel-console
  • camel-core
  • camel-csimple-joor
  • camel-datasonnet
  • camel-groovy
  • camel-hl7
  • camel-javascript
  • camel-joor
  • camel-jq
  • camel-jsonpath
  • camel-main
  • camel-management
  • camel-mvel
  • camel-ognl
  • camel-platform-http-jolokia
  • camel-python
  • camel-saxon
  • camel-spring-xml
  • camel-stax
  • camel-xml-io-dsl
  • camel-xml-jaxb-dsl
  • camel-xml-jaxb-dsl-test-definition
  • camel-xml-jaxb-dsl-test-spring

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • core/camel-core: 2 test(s) disabled on GitHub Actions
All tested modules (23 modules)
  • Camel :: Console
  • Camel :: Core
  • Camel :: DataSonnet
  • Camel :: Groovy
  • Camel :: HL7
  • Camel :: JQ
  • Camel :: JSon Path
  • Camel :: JavaScript
  • Camel :: MVEL
  • Camel :: Main
  • Camel :: Management
  • Camel :: OGNL (deprecated)
  • Camel :: Platform HTTP :: Jolokia
  • Camel :: Python
  • Camel :: Saxon
  • Camel :: Spring XML
  • Camel :: StAX
  • Camel :: XML DSL Jaxb :: Test :: Definition
  • Camel :: XML DSL Jaxb :: Test :: Spring
  • Camel :: XML DSL with camel-xml-io
  • Camel :: XML DSL with camel-xml-jaxb
  • Camel :: csimple jOOR (deprecated)
  • Camel :: jOOR

⚙️ View full build and test results

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_25 so 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 defaultSignatureSchemeNumber for later comparison
    • Empty filter → 0 schemes (same behavior)
    • Explicit schemes override filter → 4 schemes (same behavior)
    • .* filter → all defaults preserved (verified against captured count)
  • The adjacent testSignatureSchemesDoNotAffectOtherSettings test keeps min = JAVA_21 with 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 oscerd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants