slachiewicz opened a new pull request, #679:
URL: https://github.com/apache/maven-doxia-sitetools/pull/679

   `ReaderFactory` and `WriterFactory` are deprecated at class level in 
plexus-utils 4. Their javadoc points at the XML stream classes for XML and at 
the JDK for everything else — which is exactly what they do internally, so the 
substitutions are the factory bodies themselves:
   
   | was | now |
   |---|---|
   | `newXmlReader(x)` | `new XmlStreamReader(x)` |
   | `newReader(file, enc)` | `new InputStreamReader(Files.newInputStream(..), 
enc)` |
   | `newWriter(file, enc)` | `new 
OutputStreamWriter(Files.newOutputStream(..), enc)` |
   | `newXmlWriter(file)` | `new XmlStreamWriter(file)` |
   | `UTF_8` / `FILE_ENCODING` | `StandardCharsets.UTF_8.name()` / 
`file.encoding` |
   
   The concern with a change like this is BOM and XML encoding detection, so 
worth being explicit about why that is safe here: `XmlStreamReader` and 
`XmlStreamWriter` are the very classes the factories construct and return, and 
they come from `plexus-xml`, which the stack keeps. The detection is the same 
code, not a reimplementation. Their plexus-xml versions also carry no 
deprecated members, unlike the Commons IO equivalents whose constructors are 
all deprecated in favour of builders.
   
   `plexus-utils` stays a dependency regardless — `PathTool`, `SelectorUtils`, 
`Os` and `DirectoryScanner` are unaffected by this.
   
   Verified: `mvn clean verify` → 68 tests pass, and the HTML and CSS produced 
by the renderer tests are byte-identical to the same build from master. That 
diff covers both changed writer paths, since `css/site.css` is written by one 
of them.
   
   *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]

Reply via email to