Skip to content

Commit 17646cf

Browse files
committed
Feedback
1 parent 8ef7ff2 commit 17646cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/src/main/java/org/elasticsearch/common/logging/DeprecationLogger.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,16 +364,16 @@ static String escapeBackslashesAndQuotes(final String s) {
364364
* We want a fast path check to avoid creating the string builder and copying characters if needed. So we walk the string looking
365365
* for either of the characters that we need to escape. If we find a character that needs escaping, we start over and
366366
*/
367-
boolean encodingNeeded = false;
367+
boolean escapingNeeded = false;
368368
for (int i = 0; i < s.length(); i++) {
369369
final char c = s.charAt(i);
370370
if (c == '\\' || c == '"') {
371-
encodingNeeded = true;
371+
escapingNeeded = true;
372372
break;
373373
}
374374
}
375375

376-
if (encodingNeeded) {
376+
if (escapingNeeded) {
377377
final StringBuilder sb = new StringBuilder();
378378
for (final char c : s.toCharArray()) {
379379
if (c == '\\' || c == '"') {
@@ -409,7 +409,7 @@ static String escapeBackslashesAndQuotes(final String s) {
409409
for (int i = 0x80; i <= 0xFF; i++) {
410410
doesNotNeedEncoding.set(i);
411411
}
412-
assert doesNotNeedEncoding.get('%') == false;
412+
assert doesNotNeedEncoding.get('%') == false : doesNotNeedEncoding;
413413
}
414414

415415
private static final Charset UTF_8 = Charset.forName("UTF-8");

0 commit comments

Comments
 (0)