summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/main/java/com/yahoo/text/XML.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/text/XML.java')
-rw-r--r--vespajlib/src/main/java/com/yahoo/text/XML.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/text/XML.java b/vespajlib/src/main/java/com/yahoo/text/XML.java
index f4cd355b0e1..30f30b2a270 100644
--- a/vespajlib/src/main/java/com/yahoo/text/XML.java
+++ b/vespajlib/src/main/java/com/yahoo/text/XML.java
@@ -28,18 +28,17 @@ import org.xml.sax.SAXParseException;
* @author Steinar Knutsen
*/
public class XML {
-
/**
* The point of this weird class and the jumble of abstract methods is
* linking the scan for characters that must be quoted into the quoting
* table, and making it actual work to make them go out of sync again.
*/
private static abstract class LegalCharacters {
-
// To quote http://www.w3.org/TR/REC-xml/ :
// Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] |
// [#x10000-#x10FFFF]
- final boolean isLegal(int codepoint, boolean escapeLow, int stripCodePoint, boolean isAttribute) {
+ final boolean isLegal(final int codepoint, final boolean escapeLow,
+ final int stripCodePoint, final boolean isAttribute) {
if (codepoint == stripCodePoint) {
return removeCodePoint();
} else if (codepoint < ' ') {
@@ -76,7 +75,7 @@ public class XML {
}
}
- private boolean quotCodePoint(boolean isAttribute) {
+ private boolean quotCodePoint(final boolean isAttribute) {
if (isAttribute) {
quoteQuot();
return false;
@@ -85,7 +84,7 @@ public class XML {
}
}
- private boolean filterCodePoint(int codepoint) {
+ private boolean filterCodePoint(final int codepoint) {
replace(codepoint);
return false;
}
@@ -105,7 +104,7 @@ public class XML {
return false;
}
- private boolean ctrlEscapeCodePoint(int codepoint) {
+ private boolean ctrlEscapeCodePoint(final int codepoint) {
ctrlEscape(codepoint);
return false;
}
@@ -350,7 +349,8 @@ public class XML {
* </ul>
* with character entities.
*
- * @param stripCodePoint any occurrence of this character is removed from the string
+ * @param stripCodePoint
+ * any occurrence of this character is removed from the string
*/
public static String xmlEscape(String string, boolean isAttribute, boolean escapeLowAscii,
StringBuilder buffer, int stripCodePoint) {
@@ -399,7 +399,8 @@ public class XML {
/**
* Returns the Document of an XML file reader
*
- * @throws RuntimeException if the root Document cannot be returned
+ * @throws RuntimeException
+ * if the root Document cannot be returned
*/
public static Document getDocument(Reader reader) {
try {