You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2011/06/14 14:49:51 UTC

svn commit: r1135535 - /lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/util/fst/FST.java

Author: dweiss
Date: Tue Jun 14 12:49:51 2011
New Revision: 1135535

URL: http://svn.apache.org/viewvc?rev=1135535&view=rev
Log:
Backporting -1 => END_LABEL.

Modified:
    lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/util/fst/FST.java

Modified: lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/util/fst/FST.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/util/fst/FST.java?rev=1135535&r1=1135534&r2=1135535&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/util/fst/FST.java (original)
+++ lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/util/fst/FST.java Tue Jun 14 12:49:51 2011
@@ -490,7 +490,7 @@ public class FST<T> {
     if (!targetHasArcs(follow)) {
       //System.out.println("  end node");
       assert follow.isFinal();
-      arc.label = -1;
+      arc.label = END_LABEL;
       arc.output = follow.nextFinalOutput;
       arc.flags = BIT_LAST_ARC;
       return arc;
@@ -544,7 +544,7 @@ public class FST<T> {
     //System.out.println("    readFirstTarget follow.target=" + follow.target + " isFinal=" + follow.isFinal());
     if (follow.isFinal()) {
       // Insert "fake" final first arc:
-      arc.label = -1;
+      arc.label = END_LABEL;
       arc.output = follow.nextFinalOutput;
       if (follow.target <= 0) {
         arc.flags = BIT_LAST_ARC;
@@ -599,7 +599,7 @@ public class FST<T> {
 
   /** In-place read; returns the arc. */
   public Arc<T> readNextArc(Arc<T> arc) throws IOException {
-    if (arc.label == -1) {
+    if (arc.label == END_LABEL) {
       // This was a fake inserted "final" arc
       if (arc.nextArc <= 0) {
         // This arc went to virtual final node, ie has no outgoing arcs