refactor(api): remove the deprecated forRemoval APIs#318
Merged
Conversation
2.0 is binary-breaking by design, so the @deprecated(forRemoval) surface carried through the 1.6-1.9 line can go. Each removed element has a canonical replacement, so callers migrate with a rename. - DocumentSession.builder() -> dsl(); DocumentDsl.text() -> paragraph(). - The PDF-typed chrome overloads DocumentSession.{metadata,watermark,protect,header,footer}(Pdf*Options) -> the canonical Document{Metadata,Watermark,Protection,HeaderFooter} overloads. This drops the last backend.fixed.pdf.options coupling from document.api: the package-private DocumentChromeOptions Pdf* converters and PdfOutputOptionsToCanonical were dead once the bridges went. The Pdf*Options types remain available on PdfFixedLayoutBackend.builder(). - linkOptions() on the paragraph/table/image/shape/ellipse/line/barcode nodes and the inline image/shape/text runs -> linkTarget() (external URI via ExternalLinkTarget.options()). - Font.adjustFontSizeToFit (+ PdfFont/WordFont impls): engine-internal and unused; auto-size is resolved by the layout compiler. Callers and tests move to the replacements. The session-convenience chrome test is retargeted onto the canonical option types (and renamed), preserving its end-to-end render assertions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
2.0 is binary-breaking by design, so the
@Deprecated(forRemoval)surface carried through the 1.6–1.9 line can finally go. Every removed element already has a canonical replacement, so callers migrate with a rename.What
DocumentSession.builder()→dsl(),DocumentDsl.text()→paragraph().DocumentSession.{metadata,watermark,protect,header,footer}(Pdf*Options)→ the canonicalDocument{Metadata,Watermark,Protection,HeaderFooter}overloads. Removing them let the now-dead package-privateDocumentChromeOptionsPdf*converters andPdfOutputOptionsToCanonicalgo too, fully decouplingdocument.apifrombackend.fixed.pdf.options. ThePdf*Optionstypes stay usable onPdfFixedLayoutBackend.builder().linkOptions()on the paragraph / table / image / shape / ellipse / line / barcode nodes and the inline image / shape / text runs →linkTarget()(external URI viaExternalLinkTarget.options()).Font.adjustFontSizeToFit(+PdfFont/WordFontimplementations), unused — auto-size is resolved by the layout compiler.Callers and tests move to the replacements. The session-convenience chrome test is retargeted onto the canonical option types (and renamed) so its end-to-end render assertions — doc-info fields, encryption + permissions, header/footer/watermark text,
clearHeadersAndFooters— are preserved.CHANGELOG.mdand the 2.0 module-migration guide record the removals.RowBuilder.gap(deprecated since 1.5.0, notforRemoval) and the independentShapeBuilder.linkOptionsfield are left untouched.Tests
Full aggregator verify — core + render-pdf + render-docx + render-pptx + templates + testing + qa, including the javadoc and documentation-snippet-compile gates:
BUILD SUCCESS, 0 failures.