lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1412614 - in /lucene/dev/trunk/lucene/suggest/src: java/org/apache/lucene/search/suggest/fst/FSTCompletion.java test/org/apache/lucene/search/suggest/analyzing/FuzzySuggesterTest.java
Date Thu, 22 Nov 2012 16:41:18 GMT
Author: uschindler
Date: Thu Nov 22 16:41:17 2012
New Revision: 1412614

URL: http://svn.apache.org/viewvc?rev=1412614&view=rev
Log:
Fix rawtypes and fallthrough warnings in FST suggester; "all" does not work with JavaC

Modified:
    lucene/dev/trunk/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletion.java
    lucene/dev/trunk/lucene/suggest/src/test/org/apache/lucene/search/suggest/analyzing/FuzzySuggesterTest.java

Modified: lucene/dev/trunk/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletion.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletion.java?rev=1412614&r1=1412613&r2=1412614&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletion.java
(original)
+++ lucene/dev/trunk/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletion.java
Thu Nov 22 16:41:17 2012
@@ -109,7 +109,7 @@ public class FSTCompletion {
    *          Find and push an exact match to the first position of the result
    *          list if found.
    */
-  @SuppressWarnings("unchecked")
+  @SuppressWarnings({"unchecked","rawtypes"})
   public FSTCompletion(FST<Object> automaton, boolean higherWeightsFirst, boolean exactFirst)
{
     this.automaton = automaton;
     if (automaton != null) {
@@ -133,7 +133,7 @@ public class FSTCompletion {
    * Cache the root node's output arcs starting with completions with the
    * highest weights.
    */
-  @SuppressWarnings({"all"})
+  @SuppressWarnings({"unchecked","rawtypes"})
   private static Arc<Object>[] cacheRootArcs(FST<Object> automaton) {
     try {
       List<Arc<Object>> rootArcs = new ArrayList<Arc<Object>>();

Modified: lucene/dev/trunk/lucene/suggest/src/test/org/apache/lucene/search/suggest/analyzing/FuzzySuggesterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/suggest/src/test/org/apache/lucene/search/suggest/analyzing/FuzzySuggesterTest.java?rev=1412614&r1=1412613&r2=1412614&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/suggest/src/test/org/apache/lucene/search/suggest/analyzing/FuzzySuggesterTest.java
(original)
+++ lucene/dev/trunk/lucene/suggest/src/test/org/apache/lucene/search/suggest/analyzing/FuzzySuggesterTest.java
Thu Nov 22 16:41:17 2012
@@ -822,6 +822,7 @@ public class FuzzySuggesterTest extends 
     assertEquals("[barbazfoo/10]", suggester.lookup("bar baz foo", false, 5).toString());
   }
   
+  @SuppressWarnings("fallthrough")
   private static String addRandomEdit(String string, int prefixLength) {
     char[] input = string.toCharArray();
     StringBuilder builder = new StringBuilder();



Mime
View raw message