Skip to content

OPENNLP-1818: Update zlibsvm-core to 3.0.0#1000

Merged
mawiesne merged 2 commits intomainfrom
dependabot/maven/main/de.hs-heilbronn.mi-zlibsvm-core-3.0.0
Mar 31, 2026
Merged

OPENNLP-1818: Update zlibsvm-core to 3.0.0#1000
mawiesne merged 2 commits intomainfrom
dependabot/maven/main/de.hs-heilbronn.mi-zlibsvm-core-3.0.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Mar 30, 2026

Bumps de.hs-heilbronn.mi:zlibsvm-core from 2.1.2 to 3.0.0.

Release notes

Sourced from de.hs-heilbronn.mi:zlibsvm-core's releases.

zlibsvm-3.0.0

Changelog

3.0.0

Breaking Changes

  • Java 21 required — Minimum Java version raised from 17 to 21.
  • SvmTrainer.train() now returns Optional<SvmModel> — Previously returned null when cross-validation mode was enabled. Callers must update from model = trainer.train(docs) to model = trainer.train(docs).orElseThrow() (or handle the empty case).
  • SvmMetaInformation is now immutable — All 8 setter methods (setSvmConfiguration, setNumberOfClasses, setAmountOfSupportVectors, setRhoConstants, setLabelForEachClass, setProbabilityA, setProbabilityB, setNumberOfSupportVectorsForEachClass) have been removed from the interface and implementation. These were unused across the codebase.
  • NativeSvmModelWrapper multi-arg constructors replaced by Builder — The 9- and 11-parameter constructors have been replaced with a fluent NativeSvmModelWrapper.Builder. The canonical NativeSvmModelWrapper(svm_model) constructor is unchanged.
  • Assertions replaced with IllegalArgumentException — All assert statements in public API methods now throw IllegalArgumentException with descriptive messages. Code catching AssertionError from zlibsvm must catch IllegalArgumentException instead.

New Features

  • SvmDocumentImpl — A ready-to-use SvmDocument implementation is now provided in zlibsvm-core, eliminating the need for users to write their own.
  • Cross-validation test coverage — New tests verify that cross-validation mode returns an empty Optional and produces meaningful accuracy values across different fold counts.

Bug Fixes

  • SvmTrainingTestCase: copy-paste errors — Test was comparing getRhoConstants() three times instead of validating getProbabilityA() and getProbabilityB(). A separate assertion was comparing a model's config to itself instead of the reference model.
  • SvmModelImpl: incomplete config reconstruction — When loading models from native LIBSVM, only 6 of 16 configuration fields were reconstructed. Added SvmConfigurationImpl.fromNativeParameter() factory to capture all fields.
  • PrimitiveHelper: array index safety — Map-to-array conversions used HashMap keys directly as array indices, risking ArrayIndexOutOfBoundsException with non-sequential keys. Now uses sorted iteration.
  • SvmConfigurationImpl: mutable state exposuregetWeight() and getWeightLabel() returned mutable lists, allowing callers to corrupt the immutable configuration. Now wrapped in Collections.unmodifiableList().
  • SvmPerformanceTestCase: MODE_NAME typo renamed to MODEL_NAME; @BeforeEach changed to @BeforeAll so the reference benchmark runs once per class instead of before every test.

Improvements

  • Migrated to JUnit 5 (Jupiter) from JUnit 4.
  • Comprehensive JavaDoc added across all public API interfaces, enums, and core implementations.
  • README reworked — Fixed broken code formatting in the prediction example, added Requirements section, improved structure.

Dependency Updates

  • JUnit: 4.13.2 → 5.12.1
  • maven-surefire-plugin: 3.5.4 → 3.5.5
  • maven-compiler-plugin updated
  • log4j-slf4j2-impl: 2.25.1 → 2.25.3
  • maven-javadoc-plugin: 3.11.3 → 3.12.0
  • maven-source-plugin: 3.3.1 → 3.4.0
  • forbiddenapis: 3.9 → 3.10
  • license-maven-plugin: 2.6.0 → 2.7.1
  • versions-maven-plugin: 2.19.0 → 2.21.0
  • central-publishing-maven-plugin updated
  • actions/checkout: 5.0.0 → 6.0.2
  • actions/setup-java: 5.0.0 → 5.2.0
Commits
  • 27b9fbc Release 3.0.0
  • 267ac06 Bump to 3.0.0-SNAPSHOT, require Java 21
  • b546348 Add test coverage for cross-validation training path
  • dc767ec Return Optional<SvmModel> from train() instead of null for CV mode
  • 37a701f Refactor NativeSvmModelWrapper to use Builder pattern
  • 75f5f03 Make SvmMetaInformation immutable by removing unused setters
  • 9bf9859 Replace test mocks with SvmDocumentImpl in core domain
  • 90f8d0a Replace assert statements with IllegalArgumentException checks
  • fbf56f7 Fix mutable state exposure and broken Comparable contract
  • a0e7608 Add *.model to .gitignore for generated test artifacts
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [de.hs-heilbronn.mi:zlibsvm-core](https://github.com/rzo1/zlibsvm) from 2.1.2 to 3.0.0.
- [Release notes](https://github.com/rzo1/zlibsvm/releases)
- [Commits](rzo1/zlibsvm@zlibsvm-2.1.2...zlibsvm-3.0.0)

---
updated-dependencies:
- dependency-name: de.hs-heilbronn.mi:zlibsvm-core
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Mar 30, 2026
@mawiesne mawiesne changed the title Bump de.hs-heilbronn.mi:zlibsvm-core from 2.1.2 to 3.0.0 OPENNLP-1818: Update zlibsvm-core to 3.0.0 Mar 31, 2026
@mawiesne mawiesne self-assigned this Mar 31, 2026
@mawiesne mawiesne merged commit ccc42e4 into main Mar 31, 2026
9 checks passed
@dependabot dependabot bot deleted the dependabot/maven/main/de.hs-heilbronn.mi-zlibsvm-core-3.0.0 branch March 31, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants