1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369
|
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# HG changeset patch
# Parent 1370ab8cc556e2e418f5e8fcd886403e555a6fbe
Fix error in maven build when run on JDK8
diff --git a/pom.xml b/pom.xml
--- a/pom.xml
+++ b/pom.xml
@@ -81,17 +81,17 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.7</version>
+ <version>1.8</version>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
diff --git a/src/nu/validator/htmlparser/dom/HtmlDocumentBuilder.java b/src/nu/validator/htmlparser/dom/HtmlDocumentBuilder.java
--- a/src/nu/validator/htmlparser/dom/HtmlDocumentBuilder.java
+++ b/src/nu/validator/htmlparser/dom/HtmlDocumentBuilder.java
@@ -377,26 +377,26 @@ public class HtmlDocumentBuilder extends
public void setTransitionHander(TransitionHandler handler) {
transitionHandler = handler;
driver = null;
}
/**
* Indicates whether NFC normalization of source is being checked.
* @return <code>true</code> if NFC normalization of source is being checked.
- * @see nu.validator.htmlparser.impl.Tokenizer#isCheckingNormalization()
+ * @see nu.validator.htmlparser.io.Driver#isCheckingNormalization()
*/
public boolean isCheckingNormalization() {
return checkingNormalization;
}
/**
* Toggles the checking of the NFC normalization of source.
* @param enable <code>true</code> to check normalization
- * @see nu.validator.htmlparser.impl.Tokenizer#setCheckingNormalization(boolean)
+ * @see nu.validator.htmlparser.io.Driver#setCheckingNormalization(boolean)
*/
public void setCheckingNormalization(boolean enable) {
this.checkingNormalization = enable;
if (driver != null) {
driver.setCheckingNormalization(checkingNormalization);
}
}
@@ -657,17 +657,17 @@ public class HtmlDocumentBuilder extends
treeBuilder.setNamePolicy(namePolicy);
}
}
/**
* Sets the encoding sniffing heuristics.
*
* @param heuristics the heuristics to set
- * @see nu.validator.htmlparser.impl.Tokenizer#setHeuristics(nu.validator.htmlparser.common.Heuristics)
+ * @see nu.validator.htmlparser.io.Driver#setHeuristics(nu.validator.htmlparser.common.Heuristics)
*/
public void setHeuristics(Heuristics heuristics) {
this.heuristics = heuristics;
if (driver != null) {
driver.setHeuristics(heuristics);
}
}
diff --git a/src/nu/validator/htmlparser/extra/NormalizationChecker.java b/src/nu/validator/htmlparser/extra/NormalizationChecker.java
--- a/src/nu/validator/htmlparser/extra/NormalizationChecker.java
+++ b/src/nu/validator/htmlparser/extra/NormalizationChecker.java
@@ -118,19 +118,16 @@ public final class NormalizationChecker
* <code>false</code> otherwise
*/
private static boolean isComposingChar(int c) {
return COMPOSING_CHARACTERS.contains(c);
}
/**
* Constructor with mode selection.
- *
- * @param sourceTextMode whether the source text-related messages
- * should be enabled.
*/
public NormalizationChecker(Locator locator) {
super();
start();
}
/**
* @see nu.validator.htmlparser.common.CharacterHandler#start()
diff --git a/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java b/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java
--- a/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java
+++ b/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java
@@ -123,17 +123,17 @@ public class ErrorReportingTokenizer ext
public void setContentNonXmlCharPolicy(
XmlViolationPolicy contentNonXmlCharPolicy) {
this.contentNonXmlCharPolicy = contentNonXmlCharPolicy;
}
/**
* Sets the errorProfile.
*
- * @param errorProfile
+ * @param errorProfileMap
*/
public void setErrorProfile(HashMap<String, String> errorProfileMap) {
this.errorProfileMap = errorProfileMap;
}
/**
* Reports on an event based on profile selected.
*
diff --git a/src/nu/validator/htmlparser/impl/TreeBuilder.java b/src/nu/validator/htmlparser/impl/TreeBuilder.java
--- a/src/nu/validator/htmlparser/impl/TreeBuilder.java
+++ b/src/nu/validator/htmlparser/impl/TreeBuilder.java
@@ -3135,18 +3135,16 @@ public abstract class TreeBuilder<T> imp
}
/**
*
* <p>
* C++ memory note: The return value must be released.
*
* @return
- * @throws SAXException
- * @throws StopSniffingException
*/
public static String extractCharsetFromContent(String attributeValue
// CPPONLY: , TreeBuilder tb
) {
// This is a bit ugly. Converting the string to char array in order to
// make the portability layer smaller.
int charsetState = CHARSET_INITIAL;
int start = -1;
diff --git a/src/nu/validator/htmlparser/io/HtmlInputStreamReader.java b/src/nu/validator/htmlparser/io/HtmlInputStreamReader.java
--- a/src/nu/validator/htmlparser/io/HtmlInputStreamReader.java
+++ b/src/nu/validator/htmlparser/io/HtmlInputStreamReader.java
@@ -106,17 +106,19 @@ public final class HtmlInputStreamReader
private boolean nextCharOnNewLine;
private boolean prevWasCR;
/**
* @param inputStream
* @param errorHandler
- * @param locator
+ * @param tokenizer
+ * @param driver
+ * @param heuristics
* @throws IOException
* @throws SAXException
*/
public HtmlInputStreamReader(InputStream inputStream,
ErrorHandler errorHandler, Tokenizer tokenizer, Driver driver,
Heuristics heuristics) throws SAXException, IOException {
this.inputStream = inputStream;
this.errorHandler = errorHandler;
diff --git a/src/nu/validator/htmlparser/io/MetaSniffer.java b/src/nu/validator/htmlparser/io/MetaSniffer.java
--- a/src/nu/validator/htmlparser/io/MetaSniffer.java
+++ b/src/nu/validator/htmlparser/io/MetaSniffer.java
@@ -85,17 +85,16 @@ public class MetaSniffer extends MetaSca
/**
* Main loop.
*
* @return
*
* @throws SAXException
* @throws IOException
- * @throws
*/
public Encoding sniff(ByteReadable readable) throws SAXException, IOException {
this.readable = readable;
stateLoop(stateSave);
return characterEncoding;
}
diff --git a/src/nu/validator/htmlparser/sax/HtmlParser.java b/src/nu/validator/htmlparser/sax/HtmlParser.java
--- a/src/nu/validator/htmlparser/sax/HtmlParser.java
+++ b/src/nu/validator/htmlparser/sax/HtmlParser.java
@@ -732,26 +732,26 @@ public class HtmlParser implements XMLRe
} else {
throw new SAXNotRecognizedException();
}
}
/**
* Indicates whether NFC normalization of source is being checked.
* @return <code>true</code> if NFC normalization of source is being checked.
- * @see nu.validator.htmlparser.impl.Tokenizer#isCheckingNormalization()
+ * @see nu.validator.htmlparser.io.Driver#isCheckingNormalization()
*/
public boolean isCheckingNormalization() {
return checkingNormalization;
}
/**
* Toggles the checking of the NFC normalization of source.
* @param enable <code>true</code> to check normalization
- * @see nu.validator.htmlparser.impl.Tokenizer#setCheckingNormalization(boolean)
+ * @see nu.validator.htmlparser.io.Driver#setCheckingNormalization(boolean)
*/
public void setCheckingNormalization(boolean enable) {
this.checkingNormalization = enable;
if (driver != null) {
driver.setCheckingNormalization(checkingNormalization);
}
}
@@ -1005,18 +1005,17 @@ public class HtmlParser implements XMLRe
*
* @return the reportingDoctype
*/
public boolean isReportingDoctype() {
return reportingDoctype;
}
/**
- * @param errorProfile
- * @see nu.validator.htmlparser.impl.errorReportingTokenizer#setErrorProfile(set)
+ * @param errorProfileMap
*/
public void setErrorProfile(HashMap<String, String> errorProfileMap) {
this.errorProfileMap = errorProfileMap;
}
/**
* The policy for non-NCName element and attribute names.
* @param namePolicy
@@ -1029,17 +1028,17 @@ public class HtmlParser implements XMLRe
treeBuilder.setNamePolicy(namePolicy);
}
}
/**
* Sets the encoding sniffing heuristics.
*
* @param heuristics the heuristics to set
- * @see nu.validator.htmlparser.impl.Tokenizer#setHeuristics(nu.validator.htmlparser.common.Heuristics)
+ * @see nu.validator.htmlparser.io.Driver#setHeuristics(nu.validator.htmlparser.common.Heuristics)
*/
public void setHeuristics(Heuristics heuristics) {
this.heuristics = heuristics;
if (driver != null) {
driver.setHeuristics(heuristics);
}
}
diff --git a/src/nu/validator/htmlparser/sax/NameCheckingXmlSerializer.java b/src/nu/validator/htmlparser/sax/NameCheckingXmlSerializer.java
--- a/src/nu/validator/htmlparser/sax/NameCheckingXmlSerializer.java
+++ b/src/nu/validator/htmlparser/sax/NameCheckingXmlSerializer.java
@@ -35,17 +35,17 @@ public class NameCheckingXmlSerializer e
super(out);
}
public NameCheckingXmlSerializer(Writer out) {
super(out);
}
/**
- * @see nu.validator.htmlparser.sax.XmlSerializer#checkNCName()
+ * @see nu.validator.htmlparser.sax.XmlSerializer#checkNCName(java.lang.String)
*/
@Override protected void checkNCName(String name) throws SAXException {
if (!NCName.isNCName(name)) {
throw new SAXException("Not an XML 1.0 4th ed. NCName: " + name);
}
}
}
diff --git a/src/nu/validator/htmlparser/xom/HtmlBuilder.java b/src/nu/validator/htmlparser/xom/HtmlBuilder.java
--- a/src/nu/validator/htmlparser/xom/HtmlBuilder.java
+++ b/src/nu/validator/htmlparser/xom/HtmlBuilder.java
@@ -265,17 +265,17 @@ public class HtmlBuilder extends Builder
tokenize(is);
return treeBuilder.getDocumentFragment();
}
/**
* Parse a fragment from SAX <code>InputSource</code>.
* @param is the <code>InputSource</code>
* @param contextLocal the local name of the context element
- * @parem contextNamespace the namespace of the context element
+ * @param contextNamespace the namespace of the context element
* @return the fragment
* @throws ParsingException in case of an XML violation
* @throws IOException if IO goes wrang
*/
public Nodes buildFragment(InputSource is, String contextLocal, String contextNamespace)
throws IOException, ParsingException {
lazyInit();
treeBuilder.setFragmentContext(contextLocal.intern(), contextNamespace.intern(), null, false);
@@ -414,26 +414,26 @@ public class HtmlBuilder extends Builder
public void setTransitionHander(TransitionHandler handler) {
transitionHandler = handler;
driver = null;
}
/**
* Indicates whether NFC normalization of source is being checked.
* @return <code>true</code> if NFC normalization of source is being checked.
- * @see nu.validator.htmlparser.impl.Tokenizer#isCheckingNormalization()
+ * @see nu.validator.htmlparser.io.Driver#isCheckingNormalization()
*/
public boolean isCheckingNormalization() {
return checkingNormalization;
}
/**
* Toggles the checking of the NFC normalization of source.
* @param enable <code>true</code> to check normalization
- * @see nu.validator.htmlparser.impl.Tokenizer#setCheckingNormalization(boolean)
+ * @see nu.validator.htmlparser.io.Driver#setCheckingNormalization(boolean)
*/
public void setCheckingNormalization(boolean enable) {
this.checkingNormalization = enable;
if (driver != null) {
driver.setCheckingNormalization(checkingNormalization);
}
}
@@ -694,17 +694,17 @@ public class HtmlBuilder extends Builder
treeBuilder.setNamePolicy(namePolicy);
}
}
/**
* Sets the encoding sniffing heuristics.
*
* @param heuristics the heuristics to set
- * @see nu.validator.htmlparser.impl.Tokenizer#setHeuristics(nu.validator.htmlparser.common.Heuristics)
+ * @see nu.validator.htmlparser.io.Driver#setHeuristics(nu.validator.htmlparser.common.Heuristics)
*/
public void setHeuristics(Heuristics heuristics) {
this.heuristics = heuristics;
if (driver != null) {
driver.setHeuristics(heuristics);
}
}
|