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

   Two changes that turned out to be one thread: the converter already declared 
its component with `@Named` and shipped a Sisu index, yet still built a 
`DefaultPlexusContainer` by hand and looked parsers and sink factories up by 
role hint.
   
   `DefaultConverter` now takes the two component maps on its constructor, so 
the wiring is declared rather than performed, and the container start/stop that 
bracketed every conversion is gone. `DoxiaFormat#getParser` and 
`#getSinkFactory` take those maps in place of the container; a missing 
component becomes an `IllegalStateException` naming the format and role hint, 
which is what an absent Doxia module actually looks like.
   
   Two things about the CLI side are worth flagging, because neither is obvious 
and both cost a debugging round:
   
   - The injector is built from `java.class.path`, not from the class loader. 
Since Java 9 the application class loader is no longer a `URLClassLoader`, so 
`URLClassSpace` cannot enumerate its own entries.
   - It asks the injector for `DefaultConverter`, not `Converter`. Sisu 
registers each component under its implementation type, so the interface 
carries no binding of its own — asking for it fails with `No implementation for 
Converter was bound` even though scanning found the class.
   
   The SLF4J move rides along because it was blocked by a single line: the 
debug flag set the log level through `org.slf4j.impl.SimpleLogger`, a package 
that exists only in 1.x. 2.x moved the class to `org.slf4j.simple` and dropped 
`org.slf4j.impl` entirely. Spelling the property name out decouples it from 
either package, since both releases read the same key.
   
   Verified: 23 unit tests pass; the shaded jar carries 
`org/slf4j/simple/SimpleLogger` and no `org/slf4j/impl`; `-X` still turns debug 
logging on and its absence still leaves it off; and the CLI converting a file 
and a directory tree produces Markdown and XHTML byte-identical to the same jar 
built from master.
   
   *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