Skip to content

Commit e39ad5f

Browse files
committed
Various hacks to get Docs to build with Java 12
1 parent 42109b9 commit e39ad5f

File tree

3 files changed

+61
-54
lines changed

3 files changed

+61
-54
lines changed

pom.xml

+3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@
9494
<groupId>org.apache.maven.plugins</groupId>
9595
<artifactId>maven-javadoc-plugin</artifactId>
9696
<version>2.9</version>
97+
<configuration>
98+
<source>7</source>
99+
</configuration>
97100
<executions>
98101
<execution>
99102
<id>attach-javadocs</id>

src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java

+20-16
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ protected static void enableOrDisableExternalEntityParsing(
205205
* @return
206206
* an XML Document.
207207
*
208-
* @throws FactoryConfigurationError
209-
* @throws ParserConfigurationException
208+
* @throws FactoryConfigurationError xyz
209+
* @throws ParserConfigurationException xyz
210210
*/
211211
protected static Document createDocumentImpl(
212212
String name, String namespaceURI, boolean enableExternalEntities,
@@ -240,12 +240,12 @@ protected static Document createDocumentImpl(
240240
* {@link DocumentBuilderFactory}
241241
* @return
242242
* a builder node that can be used to add more nodes to the XML document.
243-
* @throws ParserConfigurationException
244243
*
245-
* @throws FactoryConfigurationError
246-
* @throws ParserConfigurationException
247-
* @throws IOException
248-
* @throws SAXException
244+
* @throws ParserConfigurationException xyz
245+
* @throws FactoryConfigurationError xyz
246+
* @throws ParserConfigurationException xyz
247+
* @throws IOException xyz
248+
* @throws SAXException xyz
249249
*/
250250
protected static Document parseDocumentImpl(
251251
InputSource inputSource, boolean enableExternalEntities,
@@ -268,7 +268,7 @@ protected static Document parseDocumentImpl(
268268
* Uses approach I documented on StackOverflow:
269269
* http://stackoverflow.com/a/979606/4970
270270
*
271-
* @throws XPathExpressionException
271+
* @throws XPathExpressionException xyz
272272
*/
273273
protected void stripWhitespaceOnlyTextNodesImpl()
274274
throws XPathExpressionException
@@ -297,7 +297,7 @@ protected void stripWhitespaceOnlyTextNodesImpl()
297297
*
298298
* @return
299299
* a builder node at the same location as before the operation.
300-
* @throws XPathExpressionException
300+
* @throws XPathExpressionException xyz
301301
*/
302302
public abstract BaseXMLBuilder stripWhitespaceOnlyTextNodes()
303303
throws XPathExpressionException;
@@ -533,7 +533,7 @@ protected String lookupNamespaceURIImpl(String name) {
533533
* the name of the XML element.
534534
* @param namespaceURI
535535
* a namespace URI
536-
* @return
536+
* @return xyz
537537
*
538538
* @throws IllegalStateException
539539
* if you attempt to add a child element to an XML node that already
@@ -757,6 +757,7 @@ protected Element elementImpl(String name, String namespaceURI) {
757757
*
758758
* @param name
759759
* the name of the XML element.
760+
* @return xyz
760761
*
761762
* @throws IllegalStateException
762763
* if you attempt to add a sibling element to a node where there are already
@@ -776,6 +777,7 @@ protected Element elementBeforeImpl(String name) {
776777
* the name of the XML element.
777778
* @param namespaceURI
778779
* a namespace URI
780+
* @return xyz
779781
*
780782
* @throws IllegalStateException
781783
* if you attempt to add a sibling element to a node where there are already
@@ -1253,6 +1255,8 @@ protected Node upImpl(int steps) {
12531255
}
12541256

12551257
/**
1258+
* @param anXmlElement xyz
1259+
*
12561260
* @throws IllegalStateException
12571261
* if the current element contains any child text nodes that aren't pure whitespace.
12581262
* We allow whitespace so parsed XML documents containing indenting or pretty-printing
@@ -1298,7 +1302,7 @@ protected void assertElementContainsNoOrWhitespaceOnlyTextNodes(Node anXmlElemen
12981302
* null or an empty Properties object, in which case the default output
12991303
* properties will be applied.
13001304
*
1301-
* @throws TransformerException
1305+
* @throws TransformerException xyz
13021306
*/
13031307
public void toWriter(boolean wholeDocument, Writer writer, Properties outputProperties)
13041308
throws TransformerException {
@@ -1337,7 +1341,7 @@ public void toWriter(boolean wholeDocument, Writer writer, Properties outputProp
13371341
* null or an empty Properties object, in which case the default output
13381342
* properties will be applied.
13391343
*
1340-
* @throws TransformerException
1344+
* @throws TransformerException xyz
13411345
*/
13421346
public void toWriter(Writer writer, Properties outputProperties)
13431347
throws TransformerException {
@@ -1358,7 +1362,7 @@ public void toWriter(Writer writer, Properties outputProperties)
13581362
* @return
13591363
* the XML document as a string
13601364
*
1361-
* @throws TransformerException
1365+
* @throws TransformerException xyz
13621366
*/
13631367
public String asString(Properties outputProperties) throws TransformerException {
13641368
StringWriter writer = new StringWriter();
@@ -1380,7 +1384,7 @@ public String asString(Properties outputProperties) throws TransformerException
13801384
* @return
13811385
* the XML document as a string
13821386
*
1383-
* @throws TransformerException
1387+
* @throws TransformerException xyz
13841388
*/
13851389
public String elementAsString(Properties outputProperties) throws TransformerException {
13861390
StringWriter writer = new StringWriter();
@@ -1395,7 +1399,7 @@ public String elementAsString(Properties outputProperties) throws TransformerExc
13951399
* the XML document as a string without the XML declaration at the
13961400
* beginning of the output.
13971401
*
1398-
* @throws TransformerException
1402+
* @throws TransformerException xyz
13991403
*/
14001404
public String asString() throws TransformerException {
14011405
Properties outputProperties = new Properties();
@@ -1411,7 +1415,7 @@ public String asString() throws TransformerException {
14111415
* the XML document as a string without the XML declaration at the
14121416
* beginning of the output.
14131417
*
1414-
* @throws TransformerException
1418+
* @throws TransformerException xyz
14151419
*/
14161420
public String elementAsString() throws TransformerException {
14171421
Properties outputProperties = new Properties();

src/main/java/com/jamesmurty/utils/XMLBuilder.java

+38-38
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ protected XMLBuilder(Node myNode, Node parentNode) {
107107
* @return
108108
* a builder node that can be used to add more nodes to the XML document.
109109
*
110-
* @throws FactoryConfigurationError
111-
* @throws ParserConfigurationException
110+
* @throws FactoryConfigurationError xyz
111+
* @throws ParserConfigurationException xyz
112112
*/
113113
public static XMLBuilder create(String name, String namespaceURI,
114114
boolean enableExternalEntities, boolean isNamespaceAware)
@@ -134,8 +134,8 @@ public static XMLBuilder create(String name, String namespaceURI,
134134
* @return
135135
* a builder node that can be used to add more nodes to the XML document.
136136
*
137-
* @throws FactoryConfigurationError
138-
* @throws ParserConfigurationException
137+
* @throws FactoryConfigurationError xyz
138+
* @throws ParserConfigurationException xyz
139139
*/
140140
public static XMLBuilder create(String name, boolean enableExternalEntities,
141141
boolean isNamespaceAware)
@@ -158,8 +158,8 @@ public static XMLBuilder create(String name, boolean enableExternalEntities,
158158
* @return
159159
* a builder node that can be used to add more nodes to the XML document.
160160
*
161-
* @throws FactoryConfigurationError
162-
* @throws ParserConfigurationException
161+
* @throws FactoryConfigurationError xyz
162+
* @throws ParserConfigurationException xyz
163163
*/
164164
public static XMLBuilder create(String name, String namespaceURI)
165165
throws ParserConfigurationException, FactoryConfigurationError
@@ -177,8 +177,8 @@ public static XMLBuilder create(String name, String namespaceURI)
177177
* @return
178178
* a builder node that can be used to add more nodes to the XML document.
179179
*
180-
* @throws FactoryConfigurationError
181-
* @throws ParserConfigurationException
180+
* @throws FactoryConfigurationError xyz
181+
* @throws ParserConfigurationException xyz
182182
*/
183183
public static XMLBuilder create(String name)
184184
throws ParserConfigurationException, FactoryConfigurationError
@@ -200,12 +200,12 @@ public static XMLBuilder create(String name)
200200
* {@link DocumentBuilderFactory}
201201
* @return
202202
* a builder node that can be used to add more nodes to the XML document.
203-
* @throws ParserConfigurationException
204203
*
205-
* @throws FactoryConfigurationError
206-
* @throws ParserConfigurationException
207-
* @throws IOException
208-
* @throws SAXException
204+
* @throws ParserConfigurationException xyz
205+
* @throws FactoryConfigurationError xyz
206+
* @throws ParserConfigurationException xyz
207+
* @throws IOException xyz
208+
* @throws SAXException xyz
209209
*/
210210
public static XMLBuilder parse(
211211
InputSource inputSource, boolean enableExternalEntities,
@@ -232,11 +232,11 @@ public static XMLBuilder parse(
232232
* @return
233233
* a builder node that can be used to add more nodes to the XML document.
234234
*
235-
* @throws ParserConfigurationException
236-
* @throws FactoryConfigurationError
237-
* @throws ParserConfigurationException
238-
* @throws IOException
239-
* @throws SAXException
235+
* @throws ParserConfigurationException xyz
236+
* @throws FactoryConfigurationError xyz
237+
* @throws ParserConfigurationException xyz
238+
* @throws IOException xyz
239+
* @throws SAXException xyz
240240
*/
241241
public static XMLBuilder parse(
242242
String xmlString, boolean enableExternalEntities,
@@ -264,11 +264,11 @@ public static XMLBuilder parse(
264264
* @return
265265
* a builder node that can be used to add more nodes to the XML document.
266266
*
267-
* @throws ParserConfigurationException
268-
* @throws FactoryConfigurationError
269-
* @throws ParserConfigurationException
270-
* @throws IOException
271-
* @throws SAXException
267+
* @throws ParserConfigurationException xyz
268+
* @throws FactoryConfigurationError xyz
269+
* @throws ParserConfigurationException xyz
270+
* @throws IOException xyz
271+
* @throws SAXException xyz
272272
*/
273273
public static XMLBuilder parse(File xmlFile, boolean enableExternalEntities,
274274
boolean isNamespaceAware)
@@ -289,12 +289,12 @@ public static XMLBuilder parse(File xmlFile, boolean enableExternalEntities,
289289
* an XML document input source that will be parsed into a DOM.
290290
* @return
291291
* a builder node that can be used to add more nodes to the XML document.
292-
* @throws ParserConfigurationException
293292
*
294-
* @throws FactoryConfigurationError
295-
* @throws ParserConfigurationException
296-
* @throws IOException
297-
* @throws SAXException
293+
* @throws ParserConfigurationException xyz
294+
* @throws FactoryConfigurationError xyz
295+
* @throws ParserConfigurationException xyz
296+
* @throws IOException xyz
297+
* @throws SAXException xyz
298298
*/
299299
public static XMLBuilder parse(InputSource inputSource)
300300
throws ParserConfigurationException, SAXException, IOException
@@ -312,11 +312,11 @@ public static XMLBuilder parse(InputSource inputSource)
312312
* @return
313313
* a builder node that can be used to add more nodes to the XML document.
314314
*
315-
* @throws ParserConfigurationException
316-
* @throws FactoryConfigurationError
317-
* @throws ParserConfigurationException
318-
* @throws IOException
319-
* @throws SAXException
315+
* @throws ParserConfigurationException xyz
316+
* @throws FactoryConfigurationError xyz
317+
* @throws ParserConfigurationException xyz
318+
* @throws IOException xyz
319+
* @throws SAXException xyz
320320
*/
321321
public static XMLBuilder parse(String xmlString)
322322
throws ParserConfigurationException, SAXException, IOException
@@ -334,11 +334,11 @@ public static XMLBuilder parse(String xmlString)
334334
* @return
335335
* a builder node that can be used to add more nodes to the XML document.
336336
*
337-
* @throws ParserConfigurationException
338-
* @throws FactoryConfigurationError
339-
* @throws ParserConfigurationException
340-
* @throws IOException
341-
* @throws SAXException
337+
* @throws ParserConfigurationException xyz
338+
* @throws FactoryConfigurationError xyz
339+
* @throws ParserConfigurationException xyz
340+
* @throws IOException xyz
341+
* @throws SAXException xyz
342342
*/
343343
public static XMLBuilder parse(File xmlFile)
344344
throws ParserConfigurationException, SAXException, IOException

0 commit comments

Comments
 (0)