gnodet opened a new pull request, #1945:
URL: https://github.com/apache/maven-resolver/pull/1945

   ## Summary
   
   - **IpcClient.getJarPath()**: `getClassLoader()` returns `null` for 
bootstrap classes, and `getResource()` returns `null` when the resource is not 
found. Either causes an NPE on the chained `.toString()` call. Added explicit 
null checks with fallback to system classloader and a clear error message.
   - **IpcClient.receive()**: The volatile `input` field is read and used 
without a local copy. A concurrent `close()` call can null the field between 
the read and the method invocation, causing an NPE. Fixed by capturing the 
volatile read in a local variable.
   - **IpcClient.getAddress()**: The volatile `socket` field can be nulled by a 
concurrent `close()` call. The resulting NPE is not an `IOException` and 
propagates uncaught. Fixed by capturing in a local variable with a null check.
   - **DependencyGraphParser.parseMultiResource()**: The `BufferedReader` (and 
its underlying `InputStream`) is never closed. If `parse(reader)` throws, the 
stream leaks. Wrapped in try-with-resources, consistent with the existing 
`parse(URL)` method at line 174.
   
   ## Test plan
   - [x] `mvn compile` passes for both modified modules
   - [x] `mvn test` passes for `maven-resolver-named-locks-ipc`
   - [x] `mvn test` passes for `maven-resolver-test-util`
   - [ ] CI passes
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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