View | Details | Raw Unified | Return to bug 160025
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/core/compiler/CharOperation.java (-8 / +7 lines)
Lines 2862-2874 Link Here
2862
2862
2863
	if (!equals(toBeReplaced, replacementChars)) {
2863
	if (!equals(toBeReplaced, replacementChars)) {
2864
2864
2865
		next : for (int i = 0; i < max; i++) {
2865
		next : for (int i = 0; i < max;) {
2866
			int j = 0;
2866
			int index = indexOf(toBeReplaced, array, true, i);
2867
			while (j < replacedLength) {
2867
			if (index == -1) {
2868
				if (i + j == max)
2868
				i++;
2869
					continue next;
2869
				continue next;
2870
				if (array[i + j] != toBeReplaced[j++])
2871
					continue next;
2872
			}
2870
			}
2873
			if (occurrenceCount == starts.length) {
2871
			if (occurrenceCount == starts.length) {
2874
				System.arraycopy(
2872
				System.arraycopy(
Lines 2878-2884 Link Here
2878
					0,
2876
					0,
2879
					occurrenceCount);
2877
					occurrenceCount);
2880
			}
2878
			}
2881
			starts[occurrenceCount++] = i;
2879
			starts[occurrenceCount++] = index;
2880
			i = index + replacedLength;
2882
		}
2881
		}
2883
	}
2882
	}
2884
	if (occurrenceCount == 0)
2883
	if (occurrenceCount == 0)

Return to bug 160025