rzo1 commented on code in PR #688:
URL: https://github.com/apache/opennlp/pull/688#discussion_r1845417789
##########
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:
If it is ok to leave the ort session/env open in this eval test, the
try-with-resources removal is ok. Guess the Compiler warning was, that the
final variable is unsed?
--
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]