Skip to content

Upgrade dependencies, migrate to cactoos 0.61, and stabilize CI#113

Merged
yegor256 merged 4 commits intozold-io:masterfrom
bibonix:deps-upgrade-2026-05
May 7, 2026
Merged

Upgrade dependencies, migrate to cactoos 0.61, and stabilize CI#113
yegor256 merged 4 commits intozold-io:masterfrom
bibonix:deps-upgrade-2026-05

Conversation

@bibonix
Copy link
Copy Markdown

@bibonix bibonix commented May 7, 2026

@yegor256 hi! This PR upgrades the project to current dependencies (master was failing CI on master itself), migrates the source to the new cactoos API, and fixes the existing lint failures.

Why

master is currently red. The qulice plugin in use (0.17.4) hasn't kept up with the SPDX license headers introduced in the source files, so the mvn job fails on the HeaderCheck. The markdown-lint, typos, actionlint, and codecov jobs are also failing on master. Renovate has been opening individual upgrade PRs (#99, #101, #102, #103, #105, #109, etc.), but they each fail for the same reason because they don't include the corresponding source migration. This PR consolidates them and fixes the underlying issues.

Dependency upgrades

Dependency From To
com.jcabi:parent 0.66.0 0.73.1
com.qulice:qulice-maven-plugin 0.17.4 0.27.6
org.cactoos:cactoos 0.35 0.61.0
org.llorllale:cactoos-matchers 0.11 0.25
com.github.victornoel.eo:eo-envelopes 0.0.3 1.0.0
nl.jqno.equalsverifier:equalsverifier 2.4.8 4.5
org.junit.vintage:junit-vintage-engine 5.9.3 5.14.4
org.hamcrest:hamcrest-core 1.3 replaced by org.hamcrest:hamcrest 3.0

cactoos 0.35 -> 0.61.0 source migration

The newer cactoos drops the *Scalar / *Text suffixes and moves a couple of classes between packages, so I updated all imports and call sites:

  • CheckedScalar / UncheckedScalar / IoCheckedScalar / SolidScalar / StickyScalar -> Checked / Unchecked / IoChecked / Solid / Sticky
  • TrimmedText / JoinedText / SplitText -> Trimmed / Joined / Split
  • RandomText -> Randomized
  • org.cactoos.collection.CollectionOf / Filtered -> org.cactoos.list.ListOf / org.cactoos.iterable.Filtered
  • org.cactoos.iterable.LengthOf -> org.cactoos.scalar.LengthOf (now returns Long, so call sites use .value().intValue())
  • IterableEnvelope(Scalar<Iterable>) -> IterableEnvelope(Iterable); IterableOf(List) -> IterableOf(Iterator) or IterableOf(Scalar<Iterator>)
  • Skipped(Iterable, int) -> Skipped(int, Iterable)
  • org.llorllale.cactoos.matchers.FuncApplies -> IsApplicable
  • Replaced FileWriter (PMD AvoidFileStream) with Files.newOutputStream(...) + OutputStreamWriter(...UTF-8) to also satisfy RelianceOnDefaultCharset.

qulice 0.17.4 -> 0.27.6 fixes

170 violations on the first run, all driven down to zero. Highlights:

  • Removed trailing dots from @param / @return / @throws and removed empty Javadoc lines before @-clauses.
  • Migrated all @Test(expected = ...) to Assertions.assertThrows(...) (JUnit 5 idiom).
  • Dropped public from JUnit 5 test classes/methods (JUnit5TestShouldBePackagePrivate).
  • Removed redundant @SuppressWarnings and final modifiers, qualified static inner-class references, fixed JavadocParameterOrderCheck, etc.
  • Added underscores to large numeric literals (5_124_095_577_148_911L).
  • Split CopiesTest and NetworkTest cases that contained more than one assert.
  • Added equals / hashCode to Copies.Copy (which implements Comparable).
  • Excluded transitive org.hamcrest:hamcrest-core:1.3 from junit:4.13.2 so qulice's duplicate-finder doesn't see two hamcrest jars.
  • For test files where the UnnecessaryLocalRule rule reduces readability (most arrange-act-assert tests), I added a class-level @SuppressWarnings("PMD.UnnecessaryLocalRule") instead of inlining; the main code does not suppress it.
  • Two stylistic checks that fight a deliberate test double or super-call (PMD.DataClass on Transaction.Fake; ConstructorsCodeFreeCheck on CpTransaction / TaxBeneficiaries because they super(...) with a method call) are suppressed inline with a @checkstyle comment / @SuppressWarnings.

Existing CI failures fixed (not just the ones I introduced)

  • markdown-lint: rewrote README.md to satisfy MD013/MD033/MD040/MD041/MD045/MD034/MD059/MD012 (line lengths, alt text, fenced code language, descriptive links, bare URLs, multiple blanks).
  • typos: fixed walet -> wallet (Wallet.java) and paramater -> parameter (Transaction.java).
  • actionlint: bumped actions/cache from v3 to v4 in mvn.yml and codecov.yml (v3 runner is now too old).
  • mvn matrix: bumped Java to 21 only (jUnit Jupiter 6.x requires Java 17+, so java: [11, 17] would no longer work).

Verification

mvn --errors --batch-mode clean install -Pqulice is green locally on Java 21. All green on the fork's CI (run here) for: actionlint, copyrights, markdown-lint, mvn (ubuntu/macos/windows, Java 21), pdd, reuse, typos, xcop, yamllint. Tests: 68 run, 0 failures, 0 errors, 5 skipped (the 5 skipped were already @Disabled / @Ignore upstream).

Codecov is the only fork-side red light, and only because the fork has no CODECOV_TOKEN secret; it doesn't run on PRs in this repo (only on push to master), and is also red on master today.

This is ready for merge from my side - happy to rebase or split the commits if you'd prefer.

claude added 4 commits May 7, 2026 18:26
- Bump com.jcabi:parent from 0.66.0 to 0.73.1
- Bump qulice-maven-plugin from 0.17.4 to 0.27.6
- Bump cactoos from 0.35 to 0.61.0
- Bump cactoos-matchers from 0.11 to 0.25
- Bump eo-envelopes from 0.0.3 to 1.0.0
- Bump equalsverifier from 2.4.8 to 4.5
- Bump junit-vintage-engine from 5.9.3 to 5.14.4
- Replace hamcrest-core 1.3 with hamcrest 3.0
- Migrate cactoos API: rename CheckedScalar/UncheckedScalar/IoCheckedScalar/SolidScalar/StickyScalar to Checked/Unchecked/IoChecked/Solid/Sticky
- Migrate cactoos API: rename TrimmedText/JoinedText/SplitText to Trimmed/Joined/Split
- Migrate cactoos API: replace CollectionOf with ListOf, RandomText with Randomized
- Move LengthOf from org.cactoos.iterable to org.cactoos.scalar
- Replace FuncApplies with IsApplicable from cactoos-matchers
- Remove trailing dots from javadoc @param/@return/@throws tags
- Remove empty Javadoc lines before at-clauses
- Migrate JUnit 4 `@Test(expected=...)` to `Assertions.assertThrows()`
- Drop public modifiers from JUnit 5 test classes/methods
- Replace FuncApplies with IsApplicable in test
- Add @SInCE tags to inner classes
- Add empty line before first member where required
- Add underscores to large numeric literals
- Drop unnecessary @SuppressWarnings annotations
- Replace deprecated CollectionOf with ListOf and FileWriter with OutputStreamWriter (UTF-8)
- Override equals/hashCode on Comparable (Copies.Copy)
- Reduce visibility of inner-class members declared public
- Reorder methods (public Override first)
- Misc formatting fixes
- Inline single-use locals (UnnecessaryLocalRule) where it preserves clarity, otherwise add file-level @SuppressWarnings("PMD.UnnecessaryLocalRule") on test classes
- Split tests with multiple asserts into separate methods (UnitTestContainsTooManyAsserts)
- Fix AssignmentInOperand in TaxesTest loop (`++index`)
- Annotate Transaction.Fake with @SuppressWarnings("PMD.DataClass") since it is a deliberate test double
- Qualify FkRandom inner class reference with WalletsInTest.FkRandom
- Exclude transitive org.hamcrest:hamcrest-core 1.3 from junit (we depend on hamcrest 3.0 directly)
- Restructure Wallet.File.merge to drop unnecessary local 'candidates'
- Drop redundant 'final RtTransaction that' local in equals
- Rewrite README.md to satisfy markdownlint (line lengths, alt text, fenced code language, descriptive links, bare URLs)
- Fix two typos: 'walet' -> 'wallet' in Wallet.java, 'paramater' -> 'parameter' in Transaction.java
- Bump actions/cache from v3 to v4 (the v3 runner is too old per actionlint)
- Bump CI Java matrix to 21 (junit-jupiter 6.x requires Java 17+)
@yegor256 yegor256 merged commit eb56103 into zold-io:master May 7, 2026
11 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.

3 participants