mawiesne commented on code in PR #688:
URL: https://github.com/apache/opennlp/pull/688#discussion_r1845422349
##########
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:
Compiler warning was similar to the on in the issue description, related to
close method call, via try...
##########
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:
Compiler warning was similar to the one in the issue description, related to
close method call, via try...
--
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]