ICU-9715 Review comments.

X-SVN-Rev: 33289
This commit is contained in:
Andy Heninger 2013-02-21 02:13:56 +00:00
parent 9d871b6d86
commit 4d713a0022
2 changed files with 10 additions and 10 deletions

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2012, International Business Machines Corporation and *
* Copyright (C) 2013, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -28,7 +28,7 @@ public final class CharacterIteration {
*/
public static int next32(CharacterIterator ci) {
// If the current position is at a surrogate pair, move to the trail surrogate
// which leaves it in positon for underlying iterator's next() to work.
// which leaves it in position for underlying iterator's next() to work.
int c= ci.current();
if (c >= UTF16.LEAD_SURROGATE_MIN_VALUE && c<=UTF16.LEAD_SURROGATE_MAX_VALUE) {
c = ci.next();
@ -59,7 +59,7 @@ public final class CharacterIteration {
// The call site does an initial ci.next() and calls this function
// if the 16 bit value it gets is >= LEAD_SURROGATE_MIN_VALUE.
// NOTE: we leave the underlying char iterator positioned in the
// middle of a surroage pair. ci.next() will work correctly
// middle of a surrogate pair. ci.next() will work correctly
// from there, but the ci.getIndex() will be wrong, and needs
// adjustment.
public static int nextTrail32(CharacterIterator ci, int lead) {

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2005-2012 International Business Machines Corporation and *
* Copyright (C) 2005-2013 International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -1293,19 +1293,19 @@ public class RuleBasedBreakIterator extends BreakIterator {
if (stateTable[row + RBBIDataWrapper.ACCEPTING] != 0) {
// Because this is an accepting state, any in-progress look-ahead match
// is no longer relavant. Clear out the pending lookahead status.
// is no longer relevant. Clear out the pending lookahead status.
lookaheadStatus = 0;
}
} // End of state machine main loop
// The state machine is done. Check whether it found a match...
// If c == DONE32 we ran off the end as normal, no match found. Move forward one.
// If the iterator failed to advance in the match engine when c != DONE32,
// force it ahead by one. (This second condition really indicates a defect
// in the break rules. They should always match at least one character.)
// If the iterator failed to advance in the match engine force it ahead by one.
// This indicates a defect in the break rules, which should always match
// at least one character.
if (result == initialPosition) {
if (TRACE && c != DONE32) {
if (TRACE) {
System.out.println("Iterator did not move. Advancing by 1.");
}
text.setIndex(initialPosition);