Skip to content

Commit e477d70

Browse files
author
John J. Aylward
committed
fixes object comparison
1 parent fb1db93 commit e477d70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

XML.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public static String unescape(String string) {
186186
StringBuilder sb = new StringBuilder(string.length());
187187
for (int i = 0, length = string.length(); i < length; i++) {
188188
char c = string.charAt(i);
189-
if (c == AMP) {
189+
if (c == '&') {
190190
final int semic = string.indexOf(';', i);
191191
if (semic > i) {
192192
final String entity = string.substring(i + 1, semic);
@@ -204,15 +204,15 @@ public static String unescape(String string) {
204204
if ("quot".equalsIgnoreCase(entity)) {
205205
sb.append('"');
206206
} else if ("amp".equalsIgnoreCase(entity)) {
207-
sb.append(AMP);
207+
sb.append('&');
208208
} else if ("apos".equalsIgnoreCase(entity)) {
209209
sb.append('\'');
210210
} else if ("lt".equalsIgnoreCase(entity)) {
211211
sb.append('<');
212212
} else if ("gt".equalsIgnoreCase(entity)) {
213213
sb.append('>');
214214
} else {
215-
sb.append(AMP).append(entity).append(';');
215+
sb.append('&').append(entity).append(';');
216216
}
217217
}
218218
// skip past the entity we just parsed.

0 commit comments

Comments
 (0)