slachiewicz opened a new pull request, #1095: URL: https://github.com/apache/maven-doxia/pull/1095
Phases 1 and 2 of #1092, in two commits so each stands on its own. **`HTML.Attribute` is gone from every main source.** All 42 uses were `Attribute.X.toString()` — a constant table that cost doxia-core and three modules a `java.desktop` dependency. The eleven names in use match their `SinkEventAttributes` constant exactly; I checked that by running `HTML.Attribute` against the literals rather than reading them off, so no generated output moves. The sink tests that assert exact HTML (`Xhtml5SinkTest`, `XdocSinkTest`, `MarkdownSinkTest`) pass unchanged, which is the real evidence. Five of those uses passed the `Attribute` object itself as an attribute key, in `XdocSink` and `Xhtml5Sink`. They worked only because `addAttribute` calls `name.toString()` on the key while `getAttribute`, `isDefined` and `removeAttribute` do not — so such an entry could only ever be read back with a `String`. All keys are `String` now. `SinkEventAttributes` gains `CONTENT`, the one name in use it lacked. **Phase 2 is smaller than #1092 claims, and that is my error in the issue.** It says to move `SinkUtils.getAttributeString`, `asCssString` and `filterAttributes` onto `entrySet()`. That is not possible in 2.x: all three take `javax.swing.text.AttributeSet`, which has no `entrySet()`, and widening those parameters is a binary break. The same applies to `Xhtml5BaseSink.writeStartTag(Tag, MutableAttributeSet, boolean)` and to the `SinkEventAttributeSet` methods that implement the Swing interface. Only two sites were free, both already holding a `SinkEventAttributes`. The rest waits on phase 4. What is left of javax.swing after this: `HTML.Tag` (phase 3) and `AttributeSet`/`MutableAttributeSet` (phase 4). Verified: `mvn verify` green — japicmp on both published modules, RAT and checkstyle across all ten, every test passing. Part of #1092 *This change was created with AI assistance.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
