slachiewicz opened a new pull request, #335:
URL: https://github.com/apache/maven-dependency-analyzer/pull/335

   Add an additive class-entry source abstraction so dependency analysis can 
read class bytes from a local JAR, an exploded directory, a URL, or an 
in-memory archive without changing any existing signature.
   
   Tracking: apache/maven-dependency-analyzer#329
   
   - `ClassEntrySource` (AutoCloseable) exposes `Stream<ClassEntry>`; 
`ClassEntry` exposes a name and an `open()` method for the class bytes.
   - `PathClassEntrySource` reads JARs with `ZipFile` and directories with 
`Files.walk`; `UrlClassEntrySource` delegates `file:` URLs to it and buffers 
other protocols; `BytesClassEntrySource` reads an in-memory JAR.
   - `ClassFileVisitorUtils.accept(ClassEntrySource, ClassFileVisitor)` is the 
shared core; existing URL and Path forms are unchanged.
   - `DefaultClassAnalyzer.analyze(ClassEntrySource, ClassesPatterns)` and 
`ASMDependencyAnalyzer.analyzeUsages(ClassEntrySource, ClassesPatterns)` expose 
the same behavior on the concrete implementations.
   - A parity test suite runs the same visitor and both analyzers against all 
implementations, and checks the existing 
`module-info.class`/`package-info.class` filtering.
   
   The 2.0 Maven 4 rewrite in #322 is untouched: this stays on the Java 8 / 
Maven 3 1.x line. When #331 merges, its `accept(Path, ...)` overload can 
delegate to this core without changing behavior.
   
   Verified: `JAVA_HOME=zulu-21 mvn -B -o -Prun-its verify` → BUILD SUCCESS, 
unit tests 146 → 150 (four new tests, none dropped), invoker ITs 23 passed / 0 
failed.
   


-- 
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