mirror of
https://github.com/apache/lucene.git
synced 2025-02-16 15:06:41 +00:00
Fix rawtypes and fallthrough warnings in FST suggester; "all" does not work with JavaC
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1412614 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e714ff0bc3
commit
5a91c157b6
@ -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>>();
|
||||
|
@ -822,6 +822,7 @@ public class FuzzySuggesterTest extends LuceneTestCase {
|
||||
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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user