We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug The IOUtils.close function:
IOUtils.close
atmosphere/modules/cpr/src/main/java/org/atmosphere/util/IOUtils.java
Lines 463 to 486 in d350bc5
Atmosphere Info
Expected behavior Should not throw null.
Screenshots
Systems (please complete the following information):
Additional context This is an edge case of Java behavior of varargs.
An improved implementation could be:
if (closeableArray != null) { for (Closeable closeable : closeableArray) { if (closeable != null) { try { closeable.close(); } catch (IOException ioe) { logger.info("Can't close the object", ioe); } } } }
The text was updated successfully, but these errors were encountered:
Good catch. Just out of curiosity, have you seen this cause problems in reality?
Sorry, something went wrong.
No not really, we found it as a part of a research project.
jfarcand
No branches or pull requests
Describe the bug
The
IOUtils.close
function:atmosphere/modules/cpr/src/main/java/org/atmosphere/util/IOUtils.java
Lines 463 to 486 in d350bc5
throws a null pointer exception if it is called with one single parameter which is null.
Atmosphere Info
Expected behavior
Should not throw null.
Screenshots
Systems (please complete the following information):
Additional context
This is an edge case of Java behavior of varargs.
An improved implementation could be:
The text was updated successfully, but these errors were encountered: