Skip to content

Commit f8e2401

Browse files
Remove redundant while loop
1 parent 68c238f commit f8e2401

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

user/src/com/google/gwt/user/server/rpc/impl/ServerSerializationStreamWriter.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,11 @@ public static String escapeString(String toEscape) {
321321
int i = 0;
322322
while (i < length) {
323323

324-
while (i < length) {
325-
char c = toEscape.charAt(i++);
326-
if (needsUnicodeEscape(c)) {
327-
unicodeEscape(c, charVector);
328-
} else {
329-
charVector.add(c);
330-
}
324+
char c = toEscape.charAt(i++);
325+
if (needsUnicodeEscape(c)) {
326+
unicodeEscape(c, charVector);
327+
} else {
328+
charVector.add(c);
331329
}
332330
}
333331

0 commit comments

Comments
 (0)