mirror of https://github.com/apache/lucene.git
avoid sort if there is 1 transition
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1004726 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
358cbb221b
commit
1816eee6bd
|
@ -232,7 +232,8 @@ public class State implements Serializable, Comparable<State> {
|
|||
|
||||
/** Sorts transitions array in-place. */
|
||||
public void sortTransitions(Comparator<Transition> comparator) {
|
||||
Arrays.sort(transitionsArray, 0, numTransitions, comparator);
|
||||
if (numTransitions > 1)
|
||||
Arrays.sort(transitionsArray, 0, numTransitions, comparator);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue