Skip to content

Commit

Permalink
Removed other deprecated methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
dweiss committed Aug 4, 2015
1 parent 24e3a54 commit 53686da
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ public static interface DecompositionListener
/**
* Full unicode points representation of the input compound.
*/
private IntsRef utf32 = new IntsRef(0);
private IntsRef utf32;
private IntsRefBuilder utf32Builder = new IntsRefBuilder();

/**
* This array stores the minimum number of decomposition words during traversals to
* avoid splitting a larger word into smaller chunks.
*/
private IntsRef maxPaths = new IntsRef(0);
private IntsRefBuilder maxPathsBuilder = new IntsRefBuilder();

/**
* Reusable array of decomposition chunks.
Expand Down Expand Up @@ -190,8 +190,10 @@ public void decomposition(IntsRef utf32, ArrayDeque<Chunk> chunks)
}
};

maxPaths.grow(utf32.length + 1);
Arrays.fill(maxPaths.ints, 0, utf32.length + 1, Integer.MAX_VALUE);
maxPathsBuilder.clear();
maxPathsBuilder.grow(utf32.length + 1);
Arrays.fill(maxPathsBuilder.ints(), 0, utf32.length + 1, Integer.MAX_VALUE);

matchWord(utf32, utf32.offset);

return builder.length() == 0 ? null : builder;
Expand Down Expand Up @@ -227,7 +229,7 @@ private void matchWord(IntsRef utf32, int offset) throws IOException
}
}

int [] maxPaths = this.maxPaths.ints;
int [] maxPaths = maxPathsBuilder.ints();
for (int j = wordsFromHere.size(); --j >= 0;)
{
final Chunk ch = wordsFromHere.get(j);
Expand Down

0 comments on commit 53686da

Please sign in to comment.