You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by GitBox <gi...@apache.org> on 2020/11/12 21:18:11 UTC

[GitHub] [juneau] lcc commented on a change in pull request #55: Java api fixes

lcc commented on a change in pull request #55:
URL: https://github.com/apache/juneau/pull/55#discussion_r522431953



##########
File path: juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/IOUtils.java
##########
@@ -473,10 +474,7 @@ public static int getBufferSize(String contentLength) {
 	 * @param is The input stream to close.
 	 */
 	public static void closeQuietly(InputStream is) {
-		try {
-			if (is != null)
-				is.close();
-		} catch (IOException e) {}
+

Review comment:
       This method calls is.close() and is is an InputStream. Java's documentation states that [InputStream close()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#close--) doesn't do anything.
   
   Since is.close() doesn't do anything (including throwing an IOException), having a closeQuietly method is IMHO a little confusing.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org