elharo opened a new issue, #86:
URL: https://github.com/apache/maven-shared-io/issues/86

   ## Bug #4
   
   `FileLocation.java` lines 55-71, 115-122
   
   `close()` closes the `FileChannel` and `FileInputStream` but does not set 
the `channel` and `stream` fields to `null`. After `close()`, calling `read()` 
calls `open()` which checks `if (stream == null)` — but since `stream` is still 
non-null (just closed), the re-initialization is skipped and 
`channel.read(buffer)` is called on a closed channel, throwing 
`ClosedChannelException`.
   
   Fix: set `channel = null` and `stream = null` after closing them.


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