rzo1 commented on code in PR #688:
URL: https://github.com/apache/opennlp/pull/688#discussion_r1845427070


##########
opennlp-dl/src/test/java/opennlp/dl/namefinder/NameFinderDLEval.java:
##########
@@ -200,10 +200,8 @@ public void invalidModel() {
 
       final File model = new File("invalid.onnx");
       final File vocab = new File("vocab.txt");
-
-      try (final NameFinderDL nameFinderDL = new NameFinderDL(model, vocab, 
getIds2Labels(),
-          sentenceDetector)) {
-      }
+      //noinspection resource
+      new NameFinderDL(model, vocab, getIds2Labels(), sentenceDetector);

Review Comment:
   
https://issues.apache.org/jira/projects/OPENNLP/issues/OPENNLP-1646?filter=allissues
 doesn't answer the question why it's a cure to remove try with resources in 
the test (but only there and not in other tests as well).



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