diff --git a/make/Docs.gmk b/make/Docs.gmk
index 748429da409..19e962b79af 100644
--- a/make/Docs.gmk
+++ b/make/Docs.gmk
@@ -298,6 +298,8 @@ define SetupApiDocsGenerationBody
# Create a string like "-Xdoclint:all,-syntax,-html,..."
$1_OPTIONS += -Xdoclint:all,$$(call CommaList, $$(addprefix -, \
$$(JAVADOC_DISABLED_DOCLINT)))
+ # Ignore the doclint warnings in the W3C DOM package
+ $1_OPTIONS += -Xdoclint/package:-org.w3c.*
$1_DOC_TITLE := $$($1_LONG_NAME)
Version $$(VERSION_SPECIFICATION) API \
Specification
diff --git a/src/java.xml/share/classes/javax/xml/stream/FactoryConfigurationError.java b/src/java.xml/share/classes/javax/xml/stream/FactoryConfigurationError.java
index 2351f59c406..e882914b622 100644
--- a/src/java.xml/share/classes/javax/xml/stream/FactoryConfigurationError.java
+++ b/src/java.xml/share/classes/javax/xml/stream/FactoryConfigurationError.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,9 @@ package javax.xml.stream;
public class FactoryConfigurationError extends Error {
private static final long serialVersionUID = -2994412584589975744L;
+ /**
+ * The nested exception.
+ */
Exception nested;
/**
diff --git a/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java b/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java
index 1b10d6b5ee5..00b163f9227 100644
--- a/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java
+++ b/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -45,11 +45,15 @@ import javax.xml.stream.events.*;
* @since 1.6
*/
public abstract class XMLEventFactory {
- protected XMLEventFactory(){}
-
static final String JAXPFACTORYID = "javax.xml.stream.XMLEventFactory";
static final String DEFAULIMPL = "com.sun.xml.internal.stream.events.XMLEventFactoryImpl";
+ /**
+ * Protected constructor to prevent instantiation.
+ * Use {@link #newFactory()} instead.
+ */
+ protected XMLEventFactory(){}
+
/**
* Creates a new instance of the {@code XMLEventFactory} builtin
* system-default implementation.
@@ -66,6 +70,8 @@ public abstract class XMLEventFactory {
/**
* Creates a new instance of the factory in exactly the same manner as the
* {@link #newFactory()} method.
+ *
+ * @return an instance of the {@code XMLEventFactory}
* @throws FactoryConfigurationError if an instance of this factory cannot be loaded
*/
public static XMLEventFactory newInstance()
@@ -126,6 +132,7 @@ public abstract class XMLEventFactory {
* Once an application has obtained a reference to a XMLEventFactory it
* can use the factory to configure and obtain stream instances.
*
+ * @return an instance of the {@code XMLEventFactory}
* @throws FactoryConfigurationError in case of {@linkplain
* java.util.ServiceConfigurationError service configuration error} or if
* the implementation is not available or cannot be instantiated.
@@ -474,9 +481,9 @@ public abstract class XMLEventFactory {
public abstract EntityReference createEntityReference(String name,
EntityDeclaration declaration);
/**
- * Create a comment
+ * Create a comment.
* @param text The text of the comment
- * a Comment event
+ * @return a Comment event
*/
public abstract Comment createComment(String text);
diff --git a/src/java.xml/share/classes/javax/xml/stream/XMLEventReader.java b/src/java.xml/share/classes/javax/xml/stream/XMLEventReader.java
index d20fe24bb87..93d2779d400 100644
--- a/src/java.xml/share/classes/javax/xml/stream/XMLEventReader.java
+++ b/src/java.xml/share/classes/javax/xml/stream/XMLEventReader.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -68,7 +68,7 @@ public interface XMLEventReader extends Iterator
The character stream shall not include a byte order mark.
* + * @param characterStream the character stream * @see #setPublicId * @see #setSystemId * @see #setByteStream diff --git a/src/java.xml/share/classes/org/xml/sax/Parser.java b/src/java.xml/share/classes/org/xml/sax/Parser.java index dd77611cedb..083ab54f452 100644 --- a/src/java.xml/share/classes/org/xml/sax/Parser.java +++ b/src/java.xml/share/classes/org/xml/sax/Parser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,7 +74,7 @@ public interface Parser * not request a locale change in the middle of a parse. * * @param locale A Java Locale object. - * @exception org.xml.sax.SAXException Throws an exception + * @throws org.xml.sax.SAXException Throws an exception * (using the previous or default locale) if the * requested locale is not supported. * @see org.xml.sax.SAXException @@ -176,9 +176,9 @@ public interface Parser * * @param source The input source for the top-level of the * XML document. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * @exception java.io.IOException An IO exception from the parser, + * @throws java.io.IOException An IO exception from the parser, * possibly from a byte stream or character stream * supplied by the application. * @see org.xml.sax.InputSource @@ -207,9 +207,9 @@ public interface Parser * by the application before it is passed to the parser. * * @param systemId The system identifier (URI). - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * @exception java.io.IOException An IO exception from the parser, + * @throws java.io.IOException An IO exception from the parser, * possibly from a byte stream or character stream * supplied by the application. * @see #parse(org.xml.sax.InputSource) diff --git a/src/java.xml/share/classes/org/xml/sax/SAXException.java b/src/java.xml/share/classes/org/xml/sax/SAXException.java index 172ac416a78..99362eb2f01 100644 --- a/src/java.xml/share/classes/org/xml/sax/SAXException.java +++ b/src/java.xml/share/classes/org/xml/sax/SAXException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -166,6 +166,9 @@ public class SAXException extends Exception { // Internal state. ////////////////////////////////////////////////////////////////////// + /** + * serializable fields + */ private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField( "exception", Exception.class ) }; diff --git a/src/java.xml/share/classes/org/xml/sax/XMLReader.java b/src/java.xml/share/classes/org/xml/sax/XMLReader.java index 2a78f082e4a..34d6e0587ee 100644 --- a/src/java.xml/share/classes/org/xml/sax/XMLReader.java +++ b/src/java.xml/share/classes/org/xml/sax/XMLReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -127,9 +127,9 @@ public interface XMLReader * * @param name The feature name, which is a fully-qualified URI. * @return The current value of the feature (true or false). - * @exception org.xml.sax.SAXNotRecognizedException If the feature + * @throws org.xml.sax.SAXNotRecognizedException If the feature * value can't be assigned or retrieved. - * @exception org.xml.sax.SAXNotSupportedException When the + * @throws org.xml.sax.SAXNotSupportedException When the * XMLReader recognizes the feature name but * cannot determine its value at this time. * @see #setFeature @@ -154,9 +154,9 @@ public interface XMLReader * * @param name The feature name, which is a fully-qualified URI. * @param value The requested value of the feature (true or false). - * @exception org.xml.sax.SAXNotRecognizedException If the feature + * @throws org.xml.sax.SAXNotRecognizedException If the feature * value can't be assigned or retrieved. - * @exception org.xml.sax.SAXNotSupportedException When the + * @throws org.xml.sax.SAXNotSupportedException When the * XMLReader recognizes the feature name but * cannot set the requested value. * @see #getFeature @@ -183,9 +183,9 @@ public interface XMLReader * * @param name The property name, which is a fully-qualified URI. * @return The current value of the property. - * @exception org.xml.sax.SAXNotRecognizedException If the property + * @throws org.xml.sax.SAXNotRecognizedException If the property * value can't be assigned or retrieved. - * @exception org.xml.sax.SAXNotSupportedException When the + * @throws org.xml.sax.SAXNotSupportedException When the * XMLReader recognizes the property name but * cannot determine its value at this time. * @see #setProperty @@ -213,9 +213,9 @@ public interface XMLReader * * @param name The property name, which is a fully-qualified URI. * @param value The requested value for the property. - * @exception org.xml.sax.SAXNotRecognizedException If the property + * @throws org.xml.sax.SAXNotRecognizedException If the property * value can't be assigned or retrieved. - * @exception org.xml.sax.SAXNotSupportedException When the + * @throws org.xml.sax.SAXNotSupportedException When the * XMLReader recognizes the property name but * cannot set the requested value. */ @@ -372,9 +372,9 @@ public interface XMLReader * * @param input The input source for the top-level of the * XML document. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * @exception java.io.IOException An IO exception from the parser, + * @throws java.io.IOException An IO exception from the parser, * possibly from a byte stream or character stream * supplied by the application. * @see org.xml.sax.InputSource @@ -403,9 +403,9 @@ public interface XMLReader * by the application before it is passed to the parser. * * @param systemId The system identifier (URI). - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * @exception java.io.IOException An IO exception from the parser, + * @throws java.io.IOException An IO exception from the parser, * possibly from a byte stream or character stream * supplied by the application. * @see #parse(org.xml.sax.InputSource) diff --git a/src/java.xml/share/classes/org/xml/sax/ext/Attributes2.java b/src/java.xml/share/classes/org/xml/sax/ext/Attributes2.java index 4a590f3c8b3..ab5aab93cc7 100644 --- a/src/java.xml/share/classes/org/xml/sax/ext/Attributes2.java +++ b/src/java.xml/share/classes/org/xml/sax/ext/Attributes2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -61,7 +61,7 @@ public interface Attributes2 extends Attributes * @param index The attribute index (zero-based). * @return true if the attribute was declared in the DTD, * false otherwise. - * @exception java.lang.ArrayIndexOutOfBoundsException When the + * @throws java.lang.ArrayIndexOutOfBoundsException When the * supplied index does not identify an attribute. */ public boolean isDeclared (int index); @@ -75,7 +75,7 @@ public interface Attributes2 extends Attributes * @param qName The XML qualified (prefixed) name. * @return true if the attribute was declared in the DTD, * false otherwise. - * @exception java.lang.IllegalArgumentException When the + * @throws java.lang.IllegalArgumentException When the * supplied name does not identify an attribute. */ public boolean isDeclared (String qName); @@ -96,7 +96,7 @@ public interface Attributes2 extends Attributes * @param localName The attribute's local name. * @return true if the attribute was declared in the DTD, * false otherwise. - * @exception java.lang.IllegalArgumentException When the + * @throws java.lang.IllegalArgumentException When the * supplied names do not identify an attribute. */ public boolean isDeclared (String uri, String localName); @@ -108,7 +108,7 @@ public interface Attributes2 extends Attributes * @param index The attribute index (zero-based). * @return true if the value was found in the XML text, * false if the value was provided by DTD defaulting. - * @exception java.lang.ArrayIndexOutOfBoundsException When the + * @throws java.lang.ArrayIndexOutOfBoundsException When the * supplied index does not identify an attribute. */ public boolean isSpecified (int index); @@ -127,7 +127,7 @@ public interface Attributes2 extends Attributes * @param localName The attribute's local name. * @return true if the value was found in the XML text, * false if the value was provided by DTD defaulting. - * @exception java.lang.IllegalArgumentException When the + * @throws java.lang.IllegalArgumentException When the * supplied names do not identify an attribute. */ public boolean isSpecified (String uri, String localName); @@ -139,7 +139,7 @@ public interface Attributes2 extends Attributes * @param qName The XML qualified (prefixed) name. * @return true if the value was found in the XML text, * false if the value was provided by DTD defaulting. - * @exception java.lang.IllegalArgumentException When the + * @throws java.lang.IllegalArgumentException When the * supplied name does not identify an attribute. */ public boolean isSpecified (String qName); diff --git a/src/java.xml/share/classes/org/xml/sax/ext/Attributes2Impl.java b/src/java.xml/share/classes/org/xml/sax/ext/Attributes2Impl.java index c86efbdfa2c..eefde9db579 100644 --- a/src/java.xml/share/classes/org/xml/sax/ext/Attributes2Impl.java +++ b/src/java.xml/share/classes/org/xml/sax/ext/Attributes2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -138,7 +138,7 @@ public class Attributes2Impl extends AttributesImpl implements Attributes2 * * @param index The attribute index (zero-based). * @return current flag value - * @exception java.lang.ArrayIndexOutOfBoundsException When the + * @throws java.lang.ArrayIndexOutOfBoundsException When the * supplied index does not identify an attribute. */ public boolean isSpecified (int index) @@ -157,7 +157,7 @@ public class Attributes2Impl extends AttributesImpl implements Attributes2 * the name has no Namespace URI. * @param localName The attribute's local name. * @return current flag value - * @exception java.lang.IllegalArgumentException When the + * @throws java.lang.IllegalArgumentException When the * supplied names do not identify an attribute. */ public boolean isSpecified (String uri, String localName) @@ -177,7 +177,7 @@ public class Attributes2Impl extends AttributesImpl implements Attributes2 * * @param qName The XML qualified (prefixed) name. * @return current flag value - * @exception java.lang.IllegalArgumentException When the + * @throws java.lang.IllegalArgumentException When the * supplied name does not identify an attribute. */ public boolean isSpecified (String qName) @@ -289,7 +289,7 @@ public class Attributes2Impl extends AttributesImpl implements Attributes2 * * @param index The index of the attribute (zero-based). * @param value The desired flag value. - * @exception java.lang.ArrayIndexOutOfBoundsException When the + * @throws java.lang.ArrayIndexOutOfBoundsException When the * supplied index does not identify an attribute. * @see #setType */ @@ -309,7 +309,7 @@ public class Attributes2Impl extends AttributesImpl implements Attributes2 * * @param index The index of the attribute (zero-based). * @param value The desired flag value. - * @exception java.lang.ArrayIndexOutOfBoundsException When the + * @throws java.lang.ArrayIndexOutOfBoundsException When the * supplied index does not identify an attribute. */ public void setSpecified (int index, boolean value) diff --git a/src/java.xml/share/classes/org/xml/sax/ext/DeclHandler.java b/src/java.xml/share/classes/org/xml/sax/ext/DeclHandler.java index e5e12f56fa4..7d5944656f2 100644 --- a/src/java.xml/share/classes/org/xml/sax/ext/DeclHandler.java +++ b/src/java.xml/share/classes/org/xml/sax/ext/DeclHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,7 +74,7 @@ public interface DeclHandler * * @param name The element type name. * @param model The content model as a normalized string. - * @exception SAXException The application may raise an exception. + * @throws SAXException The application may raise an exception. */ public abstract void elementDecl (String name, String model) throws SAXException; @@ -103,7 +103,7 @@ public interface DeclHandler * none of these applies. * @param value A string representing the attribute's default value, * or null if there is none. - * @exception SAXException The application may raise an exception. + * @throws SAXException The application may raise an exception. */ public abstract void attributeDecl (String eName, String aName, @@ -123,7 +123,7 @@ public interface DeclHandler * @param name The name of the entity. If it is a parameter * entity, the name will begin with '%'. * @param value The replacement text of the entity. - * @exception SAXException The application may raise an exception. + * @throws SAXException The application may raise an exception. * @see #externalEntityDecl * @see org.xml.sax.DTDHandler#unparsedEntityDecl */ @@ -145,7 +145,7 @@ public interface DeclHandler * @param publicId The entity's public identifier, or null if none * was given. * @param systemId The entity's system identifier. - * @exception SAXException The application may raise an exception. + * @throws SAXException The application may raise an exception. * @see #internalEntityDecl * @see org.xml.sax.DTDHandler#unparsedEntityDecl */ diff --git a/src/java.xml/share/classes/org/xml/sax/ext/EntityResolver2.java b/src/java.xml/share/classes/org/xml/sax/ext/EntityResolver2.java index 8b99f14fdf8..5de54eca28b 100644 --- a/src/java.xml/share/classes/org/xml/sax/ext/EntityResolver2.java +++ b/src/java.xml/share/classes/org/xml/sax/ext/EntityResolver2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -137,9 +137,9 @@ public interface EntityResolver2 extends EntityResolver * to be used by the parser, or null to indicate that no external * subset is provided. * - * @exception SAXException Any SAX exception, possibly wrapping + * @throws SAXException Any SAX exception, possibly wrapping * another exception. - * @exception IOException Probably indicating a failure to create + * @throws IOException Probably indicating a failure to create * a new InputStream or Reader, or an illegal URL. */ public InputSource getExternalSubset (String name, String baseURI) @@ -194,9 +194,9 @@ public interface EntityResolver2 extends EntityResolver * resolve the system ID against the base URI and open a connection * to resulting URI. * - * @exception SAXException Any SAX exception, possibly wrapping + * @throws SAXException Any SAX exception, possibly wrapping * another exception. - * @exception IOException Probably indicating a failure to create + * @throws IOException Probably indicating a failure to create * a new InputStream or Reader, or an illegal URL. */ public InputSource resolveEntity ( diff --git a/src/java.xml/share/classes/org/xml/sax/ext/LexicalHandler.java b/src/java.xml/share/classes/org/xml/sax/ext/LexicalHandler.java index b1ad8eb06ee..ae9a6fc4237 100644 --- a/src/java.xml/share/classes/org/xml/sax/ext/LexicalHandler.java +++ b/src/java.xml/share/classes/org/xml/sax/ext/LexicalHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -89,7 +89,7 @@ public interface LexicalHandler * external DTD subset, or null if none was declared. * (Note that this is not resolved against the document * base URI.) - * @exception SAXException The application may raise an + * @throws SAXException The application may raise an * exception. * @see #endDTD * @see #startEntity @@ -106,7 +106,7 @@ public interface LexicalHandler * DOCTYPE declaration; if the document has no DOCTYPE declaration, * this method will not be invoked. * - * @exception SAXException The application may raise an exception. + * @throws SAXException The application may raise an exception. * @see #startDTD */ public abstract void endDTD () @@ -157,7 +157,7 @@ public interface LexicalHandler * @param name The name of the entity. If it is a parameter * entity, the name will begin with '%', and if it is the * external DTD subset, it will be "[dtd]". - * @exception SAXException The application may raise an exception. + * @throws SAXException The application may raise an exception. * @see #endEntity * @see org.xml.sax.ext.DeclHandler#internalEntityDecl * @see org.xml.sax.ext.DeclHandler#externalEntityDecl @@ -170,7 +170,7 @@ public interface LexicalHandler * Report the end of an entity. * * @param name The name of the entity that is ending. - * @exception SAXException The application may raise an exception. + * @throws SAXException The application may raise an exception. * @see #startEntity */ public abstract void endEntity (String name) @@ -185,7 +185,7 @@ public interface LexicalHandler * characters} event; this event is intended only to report * the boundary. * - * @exception SAXException The application may raise an exception. + * @throws SAXException The application may raise an exception. * @see #endCDATA */ public abstract void startCDATA () @@ -195,7 +195,7 @@ public interface LexicalHandler /** * Report the end of a CDATA section. * - * @exception SAXException The application may raise an exception. + * @throws SAXException The application may raise an exception. * @see #startCDATA */ public abstract void endCDATA () @@ -214,7 +214,7 @@ public interface LexicalHandler * @param ch An array holding the characters in the comment. * @param start The starting position in the array. * @param length The number of characters to use from the array. - * @exception SAXException The application may raise an exception. + * @throws SAXException The application may raise an exception. */ public abstract void comment (char ch[], int start, int length) throws SAXException; diff --git a/src/java.xml/share/classes/org/xml/sax/helpers/AttributesImpl.java b/src/java.xml/share/classes/org/xml/sax/helpers/AttributesImpl.java index 724da5b5eed..3e4a1bc8e03 100644 --- a/src/java.xml/share/classes/org/xml/sax/helpers/AttributesImpl.java +++ b/src/java.xml/share/classes/org/xml/sax/helpers/AttributesImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -417,7 +417,7 @@ public class AttributesImpl implements Attributes * if qualified names are not available. * @param type The attribute type as a string. * @param value The attribute value. - * @exception java.lang.ArrayIndexOutOfBoundsException When the + * @throws java.lang.ArrayIndexOutOfBoundsException When the * supplied index does not point to an attribute * in the list. */ @@ -440,7 +440,7 @@ public class AttributesImpl implements Attributes * Remove an attribute from the list. * * @param index The index of the attribute (zero-based). - * @exception java.lang.ArrayIndexOutOfBoundsException When the + * @throws java.lang.ArrayIndexOutOfBoundsException When the * supplied index does not point to an attribute * in the list. */ @@ -470,7 +470,7 @@ public class AttributesImpl implements Attributes * @param index The index of the attribute (zero-based). * @param uri The attribute's Namespace URI, or the empty * string for none. - * @exception java.lang.ArrayIndexOutOfBoundsException When the + * @throws java.lang.ArrayIndexOutOfBoundsException When the * supplied index does not point to an attribute * in the list. */ @@ -490,7 +490,7 @@ public class AttributesImpl implements Attributes * @param index The index of the attribute (zero-based). * @param localName The attribute's local name, or the empty * string for none. - * @exception java.lang.ArrayIndexOutOfBoundsException When the + * @throws java.lang.ArrayIndexOutOfBoundsException When the * supplied index does not point to an attribute * in the list. */ @@ -510,7 +510,7 @@ public class AttributesImpl implements Attributes * @param index The index of the attribute (zero-based). * @param qName The attribute's qualified name, or the empty * string for none. - * @exception java.lang.ArrayIndexOutOfBoundsException When the + * @throws java.lang.ArrayIndexOutOfBoundsException When the * supplied index does not point to an attribute * in the list. */ @@ -529,7 +529,7 @@ public class AttributesImpl implements Attributes * * @param index The index of the attribute (zero-based). * @param type The attribute's type. - * @exception java.lang.ArrayIndexOutOfBoundsException When the + * @throws java.lang.ArrayIndexOutOfBoundsException When the * supplied index does not point to an attribute * in the list. */ @@ -548,7 +548,7 @@ public class AttributesImpl implements Attributes * * @param index The index of the attribute (zero-based). * @param value The attribute's value. - * @exception java.lang.ArrayIndexOutOfBoundsException When the + * @throws java.lang.ArrayIndexOutOfBoundsException When the * supplied index does not point to an attribute * in the list. */ @@ -604,7 +604,7 @@ public class AttributesImpl implements Attributes * Report a bad array index in a manipulator. * * @param index The index to report. - * @exception java.lang.ArrayIndexOutOfBoundsException Always. + * @throws java.lang.ArrayIndexOutOfBoundsException Always. */ private void badIndex (int index) throws ArrayIndexOutOfBoundsException diff --git a/src/java.xml/share/classes/org/xml/sax/helpers/DefaultHandler.java b/src/java.xml/share/classes/org/xml/sax/helpers/DefaultHandler.java index 1ee6153baed..ef7fed3f08f 100644 --- a/src/java.xml/share/classes/org/xml/sax/helpers/DefaultHandler.java +++ b/src/java.xml/share/classes/org/xml/sax/helpers/DefaultHandler.java @@ -94,12 +94,13 @@ public class DefaultHandler * document. * @return The new input source, or null to require the * default behaviour. - * @exception java.io.IOException If there is an error setting + * @throws java.io.IOException If there is an error setting * up the new input source. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.EntityResolver#resolveEntity */ + @Override public InputSource resolveEntity (String publicId, String systemId) throws IOException, SAXException { @@ -124,10 +125,11 @@ public class DefaultHandler * @param publicId The notation public identifier, or null if not * available. * @param systemId The notation system identifier. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.DTDHandler#notationDecl */ + @Override public void notationDecl (String name, String publicId, String systemId) throws SAXException { @@ -147,10 +149,11 @@ public class DefaultHandler * available. * @param systemId The entity system identifier. * @param notationName The name of the associated notation. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.DTDHandler#unparsedEntityDecl */ + @Override public void unparsedEntityDecl (String name, String publicId, String systemId, String notationName) throws SAXException @@ -176,6 +179,7 @@ public class DefaultHandler * @see org.xml.sax.ContentHandler#setDocumentLocator * @see org.xml.sax.Locator */ + @Override public void setDocumentLocator (Locator locator) { // no op @@ -190,10 +194,11 @@ public class DefaultHandler * of a document (such as allocating the root node of a tree or * creating an output file). * - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ContentHandler#startDocument */ + @Override public void startDocument () throws SAXException { @@ -209,10 +214,11 @@ public class DefaultHandler * of a document (such as finalising a tree or closing an output * file). * - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ContentHandler#endDocument */ + @Override public void endDocument () throws SAXException { @@ -229,10 +235,11 @@ public class DefaultHandler * * @param prefix The Namespace prefix being declared. * @param uri The Namespace URI mapped to the prefix. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ContentHandler#startPrefixMapping */ + @Override public void startPrefixMapping (String prefix, String uri) throws SAXException { @@ -248,10 +255,11 @@ public class DefaultHandler * each prefix mapping. * * @param prefix The Namespace prefix being declared. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ContentHandler#endPrefixMapping */ + @Override public void endPrefixMapping (String prefix) throws SAXException { @@ -278,10 +286,11 @@ public class DefaultHandler * @param attributes The attributes attached to the element. If * there are no attributes, it shall be an empty * Attributes object. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ContentHandler#startElement */ + @Override public void startElement (String uri, String localName, String qName, Attributes attributes) throws SAXException @@ -306,10 +315,11 @@ public class DefaultHandler * performed. * @param qName The qualified name (with prefix), or the * empty string if qualified names are not available. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ContentHandler#endElement */ + @Override public void endElement (String uri, String localName, String qName) throws SAXException { @@ -329,10 +339,11 @@ public class DefaultHandler * @param start The start position in the character array. * @param length The number of characters to use from the * character array. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ContentHandler#characters */ + @Override public void characters (char ch[], int start, int length) throws SAXException { @@ -352,10 +363,11 @@ public class DefaultHandler * @param start The start position in the character array. * @param length The number of characters to use from the * character array. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ContentHandler#ignorableWhitespace */ + @Override public void ignorableWhitespace (char ch[], int start, int length) throws SAXException { @@ -374,10 +386,11 @@ public class DefaultHandler * @param target The processing instruction target. * @param data The processing instruction data, or null if * none is supplied. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ContentHandler#processingInstruction */ + @Override public void processingInstruction (String target, String data) throws SAXException { @@ -394,10 +407,11 @@ public class DefaultHandler * invoking other methods. * * @param name The name of the skipped entity. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ContentHandler#processingInstruction */ + @Override public void skippedEntity (String name) throws SAXException { @@ -420,11 +434,12 @@ public class DefaultHandler * printing it to the console. * * @param e The warning information encoded as an exception. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ErrorHandler#warning * @see org.xml.sax.SAXParseException */ + @Override public void warning (SAXParseException e) throws SAXException { @@ -441,11 +456,12 @@ public class DefaultHandler * printing it to the console. * * @param e The error information encoded as an exception. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ErrorHandler#warning * @see org.xml.sax.SAXParseException */ + @Override public void error (SAXParseException e) throws SAXException { @@ -465,11 +481,12 @@ public class DefaultHandler * the parser may no longer report parsing events. * * @param e The error information encoded as an exception. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see org.xml.sax.ErrorHandler#fatalError * @see org.xml.sax.SAXParseException */ + @Override public void fatalError (SAXParseException e) throws SAXException { diff --git a/src/java.xml/share/classes/org/xml/sax/helpers/NamespaceSupport.java b/src/java.xml/share/classes/org/xml/sax/helpers/NamespaceSupport.java index 7c636901ac4..f78cae7c620 100644 --- a/src/java.xml/share/classes/org/xml/sax/helpers/NamespaceSupport.java +++ b/src/java.xml/share/classes/org/xml/sax/helpers/NamespaceSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -487,9 +487,11 @@ public class NamespaceSupport * by {@link #processName processName()}. This may only be * changed before any contexts have been pushed. * + * @param value a flag indicating whether namespace declaration attributes + * are placed into the {@link #NSDECL NSDECL} namespace * @since 1.5, SAX 2.1alpha * - * @exception IllegalStateException when attempting to set this + * @throws IllegalStateException when attempting to set this * after any context has been pushed. */ public void setNamespaceDeclUris (boolean value) @@ -511,6 +513,8 @@ public class NamespaceSupport * Returns true if namespace declaration attributes are placed into * a namespace. This behavior is not the default. * + * @return true if namespace declaration attributes are placed into a namespace, + * false otherwise * @since 1.5, SAX 2.1alpha */ public boolean isNamespaceDeclUris () diff --git a/src/java.xml/share/classes/org/xml/sax/helpers/ParserAdapter.java b/src/java.xml/share/classes/org/xml/sax/helpers/ParserAdapter.java index a12bfe991a4..072b81f1671 100644 --- a/src/java.xml/share/classes/org/xml/sax/helpers/ParserAdapter.java +++ b/src/java.xml/share/classes/org/xml/sax/helpers/ParserAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -81,7 +81,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler *Use the "org.xml.sax.parser" property to locate the * embedded SAX1 driver.
* - * @exception SAXException If the embedded driver + * @throws SAXException If the embedded driver * cannot be instantiated or if the * org.xml.sax.parser property is not specified. */ @@ -128,7 +128,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler * a new ParserAdapter. * * @param parser The SAX1 parser to embed. - * @exception java.lang.NullPointerException If the parser parameter + * @throws java.lang.NullPointerException If the parser parameter * is null. */ public ParserAdapter (Parser parser) @@ -142,7 +142,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler * Internal setup method. * * @param parser The embedded parser. - * @exception java.lang.NullPointerException If the parser parameter + * @throws java.lang.NullPointerException If the parser parameter * is null. */ private void setup (Parser parser) @@ -181,9 +181,9 @@ public class ParserAdapter implements XMLReader, DocumentHandler * * @param name The feature name, as a complete URI. * @param value The requested feature value. - * @exception SAXNotRecognizedException If the feature + * @throws SAXNotRecognizedException If the feature * can't be assigned or retrieved. - * @exception SAXNotSupportedException If the feature + * @throws SAXNotSupportedException If the feature * can't be assigned that value. * @see org.xml.sax.XMLReader#setFeature */ @@ -219,9 +219,9 @@ public class ParserAdapter implements XMLReader, DocumentHandler * * @param name The feature name, as a complete URI. * @return The current feature value. - * @exception SAXNotRecognizedException If the feature + * @throws SAXNotRecognizedException If the feature * value can't be assigned or retrieved. - * @exception SAXNotSupportedException If the + * @throws SAXNotSupportedException If the * feature is not currently readable. * @see org.xml.sax.XMLReader#setFeature */ @@ -247,9 +247,9 @@ public class ParserAdapter implements XMLReader, DocumentHandler * * @param name The property name. * @param value The property value. - * @exception SAXNotRecognizedException If the property + * @throws SAXNotRecognizedException If the property * value can't be assigned or retrieved. - * @exception SAXNotSupportedException If the property + * @throws SAXNotSupportedException If the property * can't be assigned that value. * @see org.xml.sax.XMLReader#setProperty */ @@ -267,9 +267,9 @@ public class ParserAdapter implements XMLReader, DocumentHandler * * @param name The property name. * @return The property value. - * @exception SAXNotRecognizedException If the property + * @throws SAXNotRecognizedException If the property * value can't be assigned or retrieved. - * @exception SAXNotSupportedException If the property + * @throws SAXNotSupportedException If the property * value is not currently readable. * @see org.xml.sax.XMLReader#getProperty */ @@ -380,9 +380,9 @@ public class ParserAdapter implements XMLReader, DocumentHandler * Parse an XML document. * * @param systemId The absolute URL of the document. - * @exception java.io.IOException If there is a problem reading + * @throws java.io.IOException If there is a problem reading * the raw content of the document. - * @exception SAXException If there is a problem + * @throws SAXException If there is a problem * processing the document. * @see #parse(org.xml.sax.InputSource) * @see org.xml.sax.Parser#parse(java.lang.String) @@ -398,9 +398,9 @@ public class ParserAdapter implements XMLReader, DocumentHandler * Parse an XML document. * * @param input An input source for the document. - * @exception java.io.IOException If there is a problem reading + * @throws java.io.IOException If there is a problem reading * the raw content of the document. - * @exception SAXException If there is a problem + * @throws SAXException If there is a problem * processing the document. * @see #parse(java.lang.String) * @see org.xml.sax.Parser#parse(org.xml.sax.InputSource) @@ -448,7 +448,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler * Adapter implementation method; do not call. * Adapt a SAX1 start document event. * - * @exception SAXException The client may raise a + * @throws SAXException The client may raise a * processing exception. * @see org.xml.sax.DocumentHandler#startDocument */ @@ -465,7 +465,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler * Adapter implementation method; do not call. * Adapt a SAX1 end document event. * - * @exception SAXException The client may raise a + * @throws SAXException The client may raise a * processing exception. * @see org.xml.sax.DocumentHandler#endDocument */ @@ -486,7 +486,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler * * @param qName The qualified (prefixed) name. * @param qAtts The XML attribute list (with qnames). - * @exception SAXException The client may raise a + * @throws SAXException The client may raise a * processing exception. */ public void startElement (String qName, AttributeList qAtts) @@ -616,7 +616,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler * Adapt a SAX1 end element event. * * @param qName The qualified (prefixed) name. - * @exception SAXException The client may raise a + * @throws SAXException The client may raise a * processing exception. * @see org.xml.sax.DocumentHandler#endElement */ @@ -653,7 +653,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler * @param ch An array of characters. * @param start The starting position in the array. * @param length The number of characters to use. - * @exception SAXException The client may raise a + * @throws SAXException The client may raise a * processing exception. * @see org.xml.sax.DocumentHandler#characters */ @@ -673,7 +673,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler * @param ch An array of characters. * @param start The starting position in the array. * @param length The number of characters to use. - * @exception SAXException The client may raise a + * @throws SAXException The client may raise a * processing exception. * @see org.xml.sax.DocumentHandler#ignorableWhitespace */ @@ -692,7 +692,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler * * @param target The processing instruction target. * @param data The remainder of the processing instruction - * @exception SAXException The client may raise a + * @throws SAXException The client may raise a * processing exception. * @see org.xml.sax.DocumentHandler#processingInstruction */ @@ -748,7 +748,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler * @param qName The qualified (prefixed) name. * @param isAttribute true if this is an attribute name. * @return The name split into three parts. - * @exception SAXException The client may throw + * @throws SAXException The client may throw * an exception if there is an error callback. */ private String [] processName (String qName, boolean isAttribute, @@ -773,7 +773,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler * Report a non-fatal error. * * @param message The error message. - * @exception SAXException The client may throw + * @throws SAXException The client may throw * an exception. */ void reportError (String message) @@ -807,7 +807,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler * * @param type The type of thing (feature or property). * @param name The feature or property name. - * @exception SAXNotSupportedException If a + * @throws SAXNotSupportedException If a * document is currently being parsed. */ private void checkNotParsing (String type, String name) diff --git a/src/java.xml/share/classes/org/xml/sax/helpers/ParserFactory.java b/src/java.xml/share/classes/org/xml/sax/helpers/ParserFactory.java index 5bc072eb790..d4dfb6ca6ce 100644 --- a/src/java.xml/share/classes/org/xml/sax/helpers/ParserFactory.java +++ b/src/java.xml/share/classes/org/xml/sax/helpers/ParserFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,16 +70,17 @@ public class ParserFactory { *The named class must exist and must implement the * {@link org.xml.sax.Parser Parser} interface.
* - * @exception java.lang.NullPointerException There is no value + * @return a new SAX parser + * @throws java.lang.NullPointerException There is no value * for the `org.xml.sax.parser' system property. - * @exception java.lang.ClassNotFoundException The SAX parser + * @throws java.lang.ClassNotFoundException The SAX parser * class was not found (check your CLASSPATH). - * @exception IllegalAccessException The SAX parser class was + * @throws IllegalAccessException The SAX parser class was * found, but you do not have permission to load * it. - * @exception InstantiationException The SAX parser class was + * @throws InstantiationException The SAX parser class was * found but could not be instantiated. - * @exception java.lang.ClassCastException The SAX parser class + * @throws java.lang.ClassCastException The SAX parser class * was found and instantiated, but does not implement * org.xml.sax.Parser. * @see #makeParser(java.lang.String) @@ -109,14 +110,15 @@ public class ParserFactory { * * @param className A string containing the name of the * SAX parser class. - * @exception java.lang.ClassNotFoundException The SAX parser + * @return a new SAX parser + * @throws java.lang.ClassNotFoundException The SAX parser * class was not found (check your CLASSPATH). - * @exception IllegalAccessException The SAX parser class was + * @throws IllegalAccessException The SAX parser class was * found, but you do not have permission to load * it. - * @exception InstantiationException The SAX parser class was + * @throws InstantiationException The SAX parser class was * found but could not be instantiated. - * @exception java.lang.ClassCastException The SAX parser class + * @throws java.lang.ClassCastException The SAX parser class * was found and instantiated, but does not implement * org.xml.sax.Parser. * @see #makeParser() diff --git a/src/java.xml/share/classes/org/xml/sax/helpers/XMLFilterImpl.java b/src/java.xml/share/classes/org/xml/sax/helpers/XMLFilterImpl.java index 10564ff0978..6571f3618c9 100644 --- a/src/java.xml/share/classes/org/xml/sax/helpers/XMLFilterImpl.java +++ b/src/java.xml/share/classes/org/xml/sax/helpers/XMLFilterImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -92,6 +92,7 @@ public class XMLFilterImpl /** * Construct an XML filter with the specified parent. * + * @param parent the specified parent * @see #setParent * @see #getParent */ @@ -152,9 +153,9 @@ public class XMLFilterImpl * * @param name The feature name. * @param value The requested feature value. - * @exception org.xml.sax.SAXNotRecognizedException If the feature + * @throws org.xml.sax.SAXNotRecognizedException If the feature * value can't be assigned or retrieved from the parent. - * @exception org.xml.sax.SAXNotSupportedException When the + * @throws org.xml.sax.SAXNotSupportedException When the * parent recognizes the feature name but * cannot set the requested value. */ @@ -176,9 +177,9 @@ public class XMLFilterImpl * * @param name The feature name. * @return The current value of the feature. - * @exception org.xml.sax.SAXNotRecognizedException If the feature + * @throws org.xml.sax.SAXNotRecognizedException If the feature * value can't be assigned or retrieved from the parent. - * @exception org.xml.sax.SAXNotSupportedException When the + * @throws org.xml.sax.SAXNotSupportedException When the * parent recognizes the feature name but * cannot determine its value at this time. */ @@ -200,9 +201,9 @@ public class XMLFilterImpl * * @param name The property name. * @param value The requested property value. - * @exception org.xml.sax.SAXNotRecognizedException If the property + * @throws org.xml.sax.SAXNotRecognizedException If the property * value can't be assigned or retrieved from the parent. - * @exception org.xml.sax.SAXNotSupportedException When the + * @throws org.xml.sax.SAXNotSupportedException When the * parent recognizes the property name but * cannot set the requested value. */ @@ -222,9 +223,9 @@ public class XMLFilterImpl * * @param name The property name. * @return The current value of the property. - * @exception org.xml.sax.SAXNotRecognizedException If the property + * @throws org.xml.sax.SAXNotRecognizedException If the property * value can't be assigned or retrieved from the parent. - * @exception org.xml.sax.SAXNotSupportedException When the + * @throws org.xml.sax.SAXNotSupportedException When the * parent recognizes the property name but * cannot determine its value at this time. */ @@ -331,9 +332,9 @@ public class XMLFilterImpl * Parse a document. * * @param input The input source for the document entity. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * @exception java.io.IOException An IO exception from the parser, + * @throws java.io.IOException An IO exception from the parser, * possibly from a byte stream or character stream * supplied by the application. */ @@ -349,9 +350,9 @@ public class XMLFilterImpl * Parse a document. * * @param systemId The system identifier as a fully-qualified URI. - * @exception org.xml.sax.SAXException Any SAX exception, possibly + * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * @exception java.io.IOException An IO exception from the parser, + * @throws java.io.IOException An IO exception from the parser, * possibly from a byte stream or character stream * supplied by the application. */ @@ -374,9 +375,9 @@ public class XMLFilterImpl * @param publicId The entity's public identifier, or null. * @param systemId The entity's system identifier. * @return A new InputSource or null for the default. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. - * @exception java.io.IOException The client may throw an + * @throws java.io.IOException The client may throw an * I/O-related exception while obtaining the * new InputSource. */ @@ -403,7 +404,7 @@ public class XMLFilterImpl * @param name The notation name. * @param publicId The notation's public identifier, or null. * @param systemId The notation's system identifier, or null. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void notationDecl (String name, String publicId, String systemId) @@ -422,7 +423,7 @@ public class XMLFilterImpl * @param publicId The entity's public identifier, or null. * @param systemId The entity's system identifier, or null. * @param notationName The name of the associated notation. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void unparsedEntityDecl (String name, String publicId, @@ -459,7 +460,7 @@ public class XMLFilterImpl /** * Filter a start document event. * - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void startDocument () @@ -474,7 +475,7 @@ public class XMLFilterImpl /** * Filter an end document event. * - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void endDocument () @@ -491,7 +492,7 @@ public class XMLFilterImpl * * @param prefix The Namespace prefix. * @param uri The Namespace URI. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void startPrefixMapping (String prefix, String uri) @@ -507,7 +508,7 @@ public class XMLFilterImpl * Filter an end Namespace prefix mapping event. * * @param prefix The Namespace prefix. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void endPrefixMapping (String prefix) @@ -527,7 +528,7 @@ public class XMLFilterImpl * @param qName The element's qualified (prefixed) name, or the empty * string. * @param atts The element's attributes. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void startElement (String uri, String localName, String qName, @@ -547,7 +548,7 @@ public class XMLFilterImpl * @param localName The element's local name, or the empty string. * @param qName The element's qualified (prefixed) name, or the empty * string. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void endElement (String uri, String localName, String qName) @@ -565,7 +566,7 @@ public class XMLFilterImpl * @param ch An array of characters. * @param start The starting position in the array. * @param length The number of characters to use from the array. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void characters (char ch[], int start, int length) @@ -583,7 +584,7 @@ public class XMLFilterImpl * @param ch An array of characters. * @param start The starting position in the array. * @param length The number of characters to use from the array. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void ignorableWhitespace (char ch[], int start, int length) @@ -600,7 +601,7 @@ public class XMLFilterImpl * * @param target The processing instruction target. * @param data The text following the target. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void processingInstruction (String target, String data) @@ -616,7 +617,7 @@ public class XMLFilterImpl * Filter a skipped entity event. * * @param name The name of the skipped entity. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void skippedEntity (String name) @@ -638,7 +639,7 @@ public class XMLFilterImpl * Filter a warning event. * * @param e The warning as an exception. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void warning (SAXParseException e) @@ -654,7 +655,7 @@ public class XMLFilterImpl * Filter an error event. * * @param e The error as an exception. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void error (SAXParseException e) @@ -670,7 +671,7 @@ public class XMLFilterImpl * Filter a fatal error event. * * @param e The error as an exception. - * @exception org.xml.sax.SAXException The client may throw + * @throws org.xml.sax.SAXException The client may throw * an exception during processing. */ public void fatalError (SAXParseException e) diff --git a/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderAdapter.java b/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderAdapter.java index 2cc05e24f8e..ddce3f8f7d7 100644 --- a/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderAdapter.java +++ b/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -76,7 +76,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler *Use the "org.xml.sax.driver" property to locate the SAX2 * driver to embed.
* - * @exception org.xml.sax.SAXException If the embedded driver + * @throws org.xml.sax.SAXException If the embedded driver * cannot be instantiated or if the * org.xml.sax.driver property is not specified. */ @@ -95,7 +95,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler * Parser. * * @param xmlReader The SAX2 XMLReader to wrap. - * @exception java.lang.NullPointerException If the argument is null. + * @throws java.lang.NullPointerException If the argument is null. */ public XMLReaderAdapter (XMLReader xmlReader) { @@ -133,7 +133,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler * * @param locale the locale for error reporting. * @see org.xml.sax.Parser#setLocale - * @exception org.xml.sax.SAXException Thrown unless overridden. + * @throws org.xml.sax.SAXException Thrown unless overridden. */ public void setLocale (Locale locale) throws SAXException @@ -201,9 +201,9 @@ public class XMLReaderAdapter implements Parser, ContentHandler * http://xml.org/sax/features/namespace-prefixes property. * * @param systemId The absolute URL of the document. - * @exception java.io.IOException If there is a problem reading + * @throws java.io.IOException If there is a problem reading * the raw content of the document. - * @exception org.xml.sax.SAXException If there is a problem + * @throws org.xml.sax.SAXException If there is a problem * processing the document. * @see #parse(org.xml.sax.InputSource) * @see org.xml.sax.Parser#parse(java.lang.String) @@ -223,9 +223,9 @@ public class XMLReaderAdapter implements Parser, ContentHandler * http://xml.org/sax/features/namespace-prefixes property. * * @param input An input source for the document. - * @exception java.io.IOException If there is a problem reading + * @throws java.io.IOException If there is a problem reading * the raw content of the document. - * @exception org.xml.sax.SAXException If there is a problem + * @throws org.xml.sax.SAXException If there is a problem * processing the document. * @see #parse(java.lang.String) * @see org.xml.sax.Parser#parse(org.xml.sax.InputSource) @@ -277,7 +277,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler /** * Start document event. * - * @exception org.xml.sax.SAXException The client may raise a + * @throws org.xml.sax.SAXException The client may raise a * processing exception. * @see org.xml.sax.ContentHandler#startDocument */ @@ -292,7 +292,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler /** * End document event. * - * @exception org.xml.sax.SAXException The client may raise a + * @throws org.xml.sax.SAXException The client may raise a * processing exception. * @see org.xml.sax.ContentHandler#endDocument */ @@ -334,7 +334,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler * @param localName The Namespace local name. * @param qName The qualified (prefixed) name. * @param atts The SAX2 attributes. - * @exception org.xml.sax.SAXException The client may raise a + * @throws org.xml.sax.SAXException The client may raise a * processing exception. * @see org.xml.sax.ContentHandler#endDocument */ @@ -355,7 +355,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler * @param uri The Namespace URI. * @param localName The Namespace local name. * @param qName The qualified (prefixed) name. - * @exception org.xml.sax.SAXException The client may raise a + * @throws org.xml.sax.SAXException The client may raise a * processing exception. * @see org.xml.sax.ContentHandler#endElement */ @@ -374,7 +374,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler * @param ch An array of characters. * @param start The starting position in the array. * @param length The number of characters to use. - * @exception org.xml.sax.SAXException The client may raise a + * @throws org.xml.sax.SAXException The client may raise a * processing exception. * @see org.xml.sax.ContentHandler#characters */ @@ -392,7 +392,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler * @param ch An array of characters. * @param start The starting position in the array. * @param length The number of characters to use. - * @exception org.xml.sax.SAXException The client may raise a + * @throws org.xml.sax.SAXException The client may raise a * processing exception. * @see org.xml.sax.ContentHandler#ignorableWhitespace */ @@ -409,7 +409,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler * * @param target The processing instruction target. * @param data The remainder of the processing instruction - * @exception org.xml.sax.SAXException The client may raise a + * @throws org.xml.sax.SAXException The client may raise a * processing exception. * @see org.xml.sax.ContentHandler#processingInstruction */ @@ -426,7 +426,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler * * @param name The name of the skipped entity. * @see org.xml.sax.ContentHandler#skippedEntity - * @exception org.xml.sax.SAXException Throwable by subclasses. + * @throws org.xml.sax.SAXException Throwable by subclasses. */ public void skippedEntity (String name) throws SAXException diff --git a/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderFactory.java b/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderFactory.java index 21fbdc47415..d89be6ea86d 100644 --- a/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderFactory.java +++ b/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -117,7 +117,7 @@ final public class XMLReaderFactory * removal in a future release. * * @return a new XMLReader. - * @exception org.xml.sax.SAXException If no default XMLReader class + * @throws org.xml.sax.SAXException If no default XMLReader class * can be identified and instantiated. * @see #createXMLReader(java.lang.String) */ @@ -166,8 +166,9 @@ final public class XMLReaderFactory * the caller (perhaps an applet) is not permitted to load classes * dynamically. * + * @param className a class name * @return A new XML reader. - * @exception org.xml.sax.SAXException If the class cannot be + * @throws org.xml.sax.SAXException If the class cannot be * loaded, instantiated, and cast to XMLReader. * @see #createXMLReader() */