NPEs from scan() on ProxyingInputStream.close()
See original GitHub issueUsing ClassGraph 4.8.138 and Narcissus 1.0.7, on Java 17 under linux.
Code begins
ClassGraph.CIRCUMVENT_ENCAPSULATION = CircumventEncapsulationMethod.NARCISSUS; ClassGraph classGraph = new ClassGraph(); //classGraph.enableClassInfo(); classGraph.enableAllInfo(); try (ScanResult scanResult = classGraph.scan()) {
And the scan call throws NPE from numerous threads ClassGraph-worker-XX threads.
I read something about some special handling wrt Tomcat, and I’m using Tomcat 8.5. So my first thought is whether since I’m using such an old version of Tomcat I might be out of the bounds of what you’re handling…
I’ll turn on verbose and get the logging data.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
What is the correct way to silently close InputStream in finally ...
Best way is to use Java 7 and use try with resources, or do same thing manualy and add exception from closing as...
Read more >TeeInputStream (Apache Commons IO 2.5 API)
The proxied input stream is closed when the close() method is called on this proxy. It is configurable whether the associated output stream...
Read more >Right way to Close InputStream and OutputStream in Java
It provides a closeQuitetly() method to close streams quietly i.e. above finally block can be re-written by using IOUtils.closeQuietly() as following. try{ .......
Read more >Re: [jetty-announce] Jetty 9.0.1.v20130408 Released! - Eclipse
+ 401150 close input stream used from cached resource + 401806 spdy ... scanFile() dies with an NPE if listFiles() returns null +...
Read more >Resin Change Log
keySet() for linking issues (#6288, rep by A. Thai); server: on HMUX requests, ... hessian: close of Hessian proxy stream when result is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, you’re right… I updated the points. Thanks.
@ericjs Great, thanks, this was indeed a bug, although it probably didn’t affect anything, since I think exceptions in close() are pretty universally ignored. Fixed in https://github.com/classgraph/classgraph/commit/45d5b991aed611abd228efcd2ecd40ba02489f24 .