Skip to content

build: drop the unused zxing:javase dependency and decouple two cross-module javadoc refs#294

Merged
DemchaAV merged 1 commit into
2.0-devfrom
chore/2.0-javadoc-dep-hygiene
Jul 5, 2026
Merged

build: drop the unused zxing:javase dependency and decouple two cross-module javadoc refs#294
DemchaAV merged 1 commit into
2.0-devfrom
chore/2.0-javadoc-dep-hygiene

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Why

The published graph-compose jar declares com.google.zxing:javase, but nothing in the codebase uses it — it is dead weight in every consumer's transitive tree. Ahead of the 2.0 module split, two javadoc references also reach across the future engine ↔ document boundary and would stop resolving once those packages live in separate modules. This PR is pure hygiene: zero behaviour change.

What changed

  • Drop com.google.zxing:javase. Only zxing:core types are imported anywhere (the barcode/QR render handlers under document.backend.fixed.pdf.handlers and the legacy engine.render.pdf.ecs.handlers). There are zero com.google.zxing.client references in src, examples, or benchmarks. zxing:core stays; the zxing.version property is retained for it.
  • engine/debug/LayoutSnapshot.java — convert the engine→document {@link com.demcha.compose.document.api.DocumentSession#layoutSnapshot()} to {@code DocumentSession#layoutSnapshot()}, which reads the same but does not fail to resolve once engine and document are separate modules.
  • font/FontLibrary.java — reword the getFont(name, PdfFont.class) javadoc example to be backend-neutral ("keyed by the backend's own Class token"), so the core font javadoc stops naming a PDF-backend type.

Verification

  • ./mvnw verify -pl . — green (full suite). The barcode/QR render tests pass with javase off the classpath, which is the runtime proof the removal is safe, not just that its imports were unused.
  • Byte-identity: target/classes is byte-for-byte identical to the base branch (960 classes, empty diff -rq). Production bytecode is unchanged; only the pom dependency list and javadoc source text differ.
  • ./mvnw javadoc:javadoc -pl . — clean, zero warnings, confirming the {@code} conversions don't regress the doclint gate.

… refs

Only zxing:core types are imported anywhere (the barcode/QR render
handlers); there are zero com.google.zxing.client references in src,
examples, or benchmarks, so javase was unused weight in every consumer's
transitive tree. Also neutralize two javadoc references that cross the
future engine/document module boundary:

- engine/debug/LayoutSnapshot.java: the {@link ...DocumentSession#layoutSnapshot()}
  becomes {@code DocumentSession#layoutSnapshot()} so it does not fail to
  resolve once engine and document are separate modules.
- font/FontLibrary.java: reword the getFont(name, PdfFont.class) example to
  be backend-neutral so the core font javadoc stops naming a PDF type.

Production bytecode is byte-for-byte identical to the base branch; only the
pom dependency list and javadoc text change.
@DemchaAV DemchaAV merged commit 89e5aac into 2.0-dev Jul 5, 2026
11 checks passed
@DemchaAV DemchaAV deleted the chore/2.0-javadoc-dep-hygiene branch July 5, 2026 10:36
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