Skip to content

Upgrade minimum Java version to 17 and modernize code patterns#4

Merged
marevol merged 1 commit intomainfrom
chore/upgrade-java-17
Apr 2, 2026
Merged

Upgrade minimum Java version to 17 and modernize code patterns#4
marevol merged 1 commit intomainfrom
chore/upgrade-java-17

Conversation

@marevol
Copy link
Copy Markdown
Contributor

@marevol marevol commented Apr 2, 2026

Summary

  • Raise the minimum Java version from 11 to 17 and modernize codebase with Java 17 language features
  • Bump project version to 3.1.0-SNAPSHOT to reflect the breaking baseline change

Changes Made

  • Build & CI: Update Maven compiler release and source from 11 to 17; update GitHub Actions matrix to Java 17
  • Version: Bump parent and module versions from 3.0.2-SNAPSHOT to 3.1.0-SNAPSHOT
  • Pattern matching instanceof (JEP 394): Replace verbose cast-after-instanceof with pattern variables in Saml2Settings, SettingsBuilder
  • Switch expressions (JEP 361): Convert traditional switch-case blocks to switch expressions in SchemaFactory
  • Stream API: Replace .collect(Collectors.toList()) with .toList() in SettingsBuilder
  • XPathFactory simplification: Remove JDK-specific XPathFactoryImpl workaround in Util, use standard XPathFactory.newInstance()
  • Jakarta EE: Update sample web.xml namespace to Jakarta EE with web-app 6.1 schema
  • Documentation: Update CLAUDE.md to reflect Java 17 baseline

Testing

  • CI will run mvn -B package on Java 17/Ubuntu
  • All existing tests should pass without modification

Breaking Changes

  • Minimum Java version raised from 11 to 17 — applications using this library must run on Java 17+

Additional Notes

  • No runtime behavior changes; all modifications are syntactic modernization or build configuration

- Raise compiler target and CI matrix from Java 11 to Java 17
- Bump project version to 3.1.0-SNAPSHOT (breaking change)
- Apply pattern matching for instanceof (JEP 394)
- Convert switch statements to switch expressions (JEP 361)
- Replace .collect(Collectors.toList()) with .toList()
- Simplify XPathFactory initialization, remove JDK-specific workaround
- Update sample web.xml to Jakarta EE web-app 6.1 namespace
@marevol marevol merged commit 1cfa2e1 into main Apr 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant