derhecht commented on a change in pull request #545:
URL: https://github.com/apache/nutch/pull/545#discussion_r469118584



##########
File path: 
src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java
##########
@@ -324,16 +358,19 @@ public Configuration getConf() {
 
   private void readConfiguration() throws IOException {
     LOG.info("Reading content type mappings from file 
contenttype-mapping.txt");
-    BufferedReader reader = new BufferedReader(
-        conf.getConfResourceAsReader("contenttype-mapping.txt"));
-    String line;
-    String parts[];
-    boolean formatWarningShown = false;
+    try(BufferedReader reader = new BufferedReader(

Review comment:
       it will auto-close the reader (stream), which was not done here at all.




----------------------------------------------------------------
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:
[email protected]


Reply via email to