Skip to content

Upgrade snakeyaml to 2.4 and raise Java baseline to 1.8#796

Open
dimakai wants to merge 1 commit into
DiUS:masterfrom
dimakai:modernize-java8-snakeyaml
Open

Upgrade snakeyaml to 2.4 and raise Java baseline to 1.8#796
dimakai wants to merge 1 commit into
DiUS:masterfrom
dimakai:modernize-java8-snakeyaml

Conversation

@dimakai

@dimakai dimakai commented Jul 15, 2026

Copy link
Copy Markdown

Summary

Modernizes the dependency stack so the project can stay on maintained releases. Upgrades org.yaml:snakeyaml from 1.26 to 2.4 (the latest release) and raises the Java compatibility baseline from 1.6 to 1.8.

Changes

  • Bump org.yaml:snakeyaml 1.262.4.
  • Remove the android classifier — it is no longer published in the snakeyaml 2.x line and is no longer needed (see Android note below).
  • Raise maven-compiler-plugin source/target from 1.61.8. snakeyaml 2.x requires Java 8+, and modern JDKs can no longer compile for Java 6 (Source option 6 is no longer supported).
  • Add FakeValuesTest cases covering YAML sequence → List and nested mapping → Map deserialization, plus value caching, to validate behavior under snakeyaml 2.x's safe loader (which is now the default).
  • Update README.md (new Requirements section) and CONTRIBUTING.md to reflect the Java 1.8 baseline.

Why raise the baseline?

This is the main discussion point. CONTRIBUTING.md previously mandated Java 1.6 + Android. That baseline blocks every actively maintained version of common dependencies (snakeyaml, commons-lang3, etc.) and can no longer be compiled by supported JDKs. Moving to Java 1.8 keeps the library buildable and lets it receive security/bugfix updates from upstream libraries.

Android support

snakeyaml dropped the separate android classifier in 2.x because it is no longer necessary: modern Android (with Java 8 language desugaring) runs the standard artifact. So this change keeps Android usable while removing a dead classifier, rather than dropping Android support.

Testing

  • mvn clean verifyBUILD SUCCESS
  • Tests run: 583, Failures: 0, Errors: 0, Skipped: 0

Happy to instead target snakeyaml 1.33 (last 1.x release, retains Java 6 + the android classifier) if maintainers prefer to keep the 1.6 baseline.

Made with Cursor

- Bump org.yaml:snakeyaml from 1.26 to 2.4 (latest)
- Drop the android classifier (no longer published in snakeyaml 2.x)
- Raise maven-compiler-plugin source/target from 1.6 to 1.8
  (snakeyaml 2.x requires Java 8+, and modern JDKs no longer compile for 1.6)
- Add FakeValuesTest coverage for YAML sequence/mapping deserialization
  and value caching under snakeyaml's 2.x safe loader
- Update README.md and CONTRIBUTING.md to reflect the Java 1.8 baseline
  and current Android support story (desugaring, no android artifact needed)

Co-authored-by: Cursor <cursoragent@cursor.com>
@dimakai

dimakai commented Jul 15, 2026

Copy link
Copy Markdown
Author

org.yaml:snakeyaml:1.* is a security vulnerability

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