capillary icon indicating copy to clipboard operation
capillary copied to clipboard

Resources are closed incorrectly

Open QiAnXinCodeSafe opened this issue 6 years ago • 0 comments

The outputStream may throw an exception before the resource is closed,you should use try-catch-finally or try-with-resource to close the resource. Connection.getinputstream () and connection.geterrorstream () are not closed.

https://github.com/google/capillary/blob/7dda356679c8f90d73048351ea414f22a582a2b2/demo/server/src/main/java/com/google/capillary/demo/server/FcmSender.java#L93-L108

QiAnXinCodeSafe avatar Jul 08 '19 09:07 QiAnXinCodeSafe