From 5c8adf3d63a847461a8881101576bde2d5c4fd0b Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Mon, 23 Apr 2018 11:28:54 +0200 Subject: Revert "Merge pull request #5663 from vespa-engine/revert-5628-bratseth/dispatch-summaries-take-4" This reverts commit dc350f9b5b3ea6ec73cb03f9e1a9feee9aedb754, reversing changes made to 416381813ecc71079cebdfc2fbea53db50714014. --- vespajlib/src/main/java/com/yahoo/text/XML.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'vespajlib') diff --git a/vespajlib/src/main/java/com/yahoo/text/XML.java b/vespajlib/src/main/java/com/yahoo/text/XML.java index 30f30b2a270..f4cd355b0e1 100644 --- a/vespajlib/src/main/java/com/yahoo/text/XML.java +++ b/vespajlib/src/main/java/com/yahoo/text/XML.java @@ -28,17 +28,18 @@ 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(final int codepoint, final boolean escapeLow, - final int stripCodePoint, final boolean isAttribute) { + final boolean isLegal(int codepoint, boolean escapeLow, int stripCodePoint, boolean isAttribute) { if (codepoint == stripCodePoint) { return removeCodePoint(); } else if (codepoint < ' ') { @@ -75,7 +76,7 @@ public class XML { } } - private boolean quotCodePoint(final boolean isAttribute) { + private boolean quotCodePoint(boolean isAttribute) { if (isAttribute) { quoteQuot(); return false; @@ -84,7 +85,7 @@ public class XML { } } - private boolean filterCodePoint(final int codepoint) { + private boolean filterCodePoint(int codepoint) { replace(codepoint); return false; } @@ -104,7 +105,7 @@ public class XML { return false; } - private boolean ctrlEscapeCodePoint(final int codepoint) { + private boolean ctrlEscapeCodePoint(int codepoint) { ctrlEscape(codepoint); return false; } @@ -349,8 +350,7 @@ public class XML { * * 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,8 +399,7 @@ 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 { -- cgit v1.2.3