dan-s1 commented on code in PR #9793:
URL: https://github.com/apache/nifi/pull/9793#discussion_r2021659254


##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/IdentifyMimeType.java:
##########
@@ -173,31 +174,23 @@ public void setup(final ProcessContext context) throws 
IOException {
             this.detector = config.getDetector();
             this.mimeTypes = config.getMimeRepository();
         } else {
-            setCustomMimeTypes(configStrategy, context);
-        }
-
-        this.encodingDetector = config.getEncodingDetector();
-    }
-
-    private void setCustomMimeTypes(String configStrategy, ProcessContext 
context) {

Review Comment:
   @mosermw I learnt something new as I did not realize the try with resources 
block ensures the resource is closed even when there is a return statement 
inside the try block. See more 
[here](https://www.google.com/search?q=if+return+inside+java+try+with+resources+will+the+resource+be+closed&oq=if+return+inside+java+try+with+resources+will+the+resource+be+closed+&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCjQzMjUzajBqMTWoAgiwAgE&sourceid=chrome&ie=UTF-8)



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to