lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1709251 - in /lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification: BooleanPerceptronClassifier.java SimpleNaiveBayesClassifier.java
Date Sun, 18 Oct 2015 10:08:13 GMT
Author: uschindler
Date: Sun Oct 18 10:08:13 2015
New Revision: 1709251

URL: http://svn.apache.org/viewvc?rev=1709251&view=rev
Log:
Fix warning: Remove obsolete close (try-with-resources)

Modified:
    lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/BooleanPerceptronClassifier.java
    lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/SimpleNaiveBayesClassifier.java

Modified: lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/BooleanPerceptronClassifier.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/BooleanPerceptronClassifier.java?rev=1709251&r1=1709250&r2=1709251&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/BooleanPerceptronClassifier.java
(original)
+++ lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/BooleanPerceptronClassifier.java
Sun Oct 18 10:08:13 2015
@@ -214,7 +214,6 @@ public class BooleanPerceptronClassifier
         }
       }
       tokenStream.end();
-      tokenStream.close();
     }
 
     double score = 1 - Math.exp(-1 * Math.abs(threshold - output.doubleValue()) / threshold);

Modified: lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/SimpleNaiveBayesClassifier.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/SimpleNaiveBayesClassifier.java?rev=1709251&r1=1709250&r2=1709251&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/SimpleNaiveBayesClassifier.java
(original)
+++ lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/SimpleNaiveBayesClassifier.java
Sun Oct 18 10:08:13 2015
@@ -222,7 +222,6 @@ public class SimpleNaiveBayesClassifier
           result.add(charTermAttribute.toString());
         }
         tokenStream.end();
-        tokenStream.close();
       }
     }
     return result.toArray(new String[result.size()]);



Mime
View raw message