From 454ec2e69df0e115ce2fd998dbb187e1bc750be8 Mon Sep 17 00:00:00 2001
From: Jason Uh If successful, it returns a certification path which has successfully
* satisfied all the constraints and requirements specified in the
@@ -102,10 +99,8 @@ public final class SunCertPathBuilder extends CertPathBuilderSpi {
/**
* Attempts to build a certification path using the Sun build
* algorithm from a trusted anchor(s) to a target subject, which must both
- * be specified in the input parameter set. By default, this method will
- * attempt to build in the forward direction. In order to build in the
- * reverse direction, the caller needs to pass in an instance of
- * SunCertPathBuilderParameters with the buildForward flag set to false.
+ * be specified in the input parameter set. This method will
+ * attempt to build in the forward direction: from the target to the CA.
*
* The certification path that is constructed is validated
* according to the PKIX specification.
@@ -162,11 +157,7 @@ public final class SunCertPathBuilder extends CertPathBuilderSpi {
policyTreeResult = null;
LinkedList Utility class to contain basic XML values as constants. Utility class to contain basic XML values as constants.
*
* @author Jeff Suttor
* @see Extensible Markup Language (XML) 1.1
@@ -42,15 +42,15 @@ package javax.xml;
public final class XMLConstants {
/**
- * Private constructor to prevent instantiation. Namespace URI to use to represent that there is no Namespace. Defined by the Namespace specification to be "". Defined by the Namespace specification to be "".
*
* @see
* Namespaces in XML, 5.2 Namespace Defaulting
@@ -58,9 +58,9 @@ public final class XMLConstants {
public static final String NULL_NS_URI = "";
/**
- * Prefix to use to represent the default XML Namespace. Defined by the XML specification to be "". Defined by the XML specification to be "".
*
* @see
@@ -69,10 +69,10 @@ public final class XMLConstants {
public static final String DEFAULT_NS_PREFIX = "";
/**
- * The official XML Namespace name URI. Defined by the XML specification to be
- * "{@code http://www.w3.org/XML/1998/namespace}". The official XML Namespace prefix. Defined by the XML specification to be "{@code xml}". Defined by the XML specification to be "{@code xml}".
*
* @see
- * Namespaces in XML, 3. Qualified Names<
+ * Namespaces in XML, 3. Qualified Names The official XML attribute used for specifying XML Namespace
+ * The official XML attribute used for specifying XML Namespace
* declarations, {@link #XMLNS_ATTRIBUTE
- * XMLConstants.XMLNS_ATTRIBUTE}, Namespace name URI. Defined by the XML specification to be
- * "{@code http://www.w3.org/2000/xmlns/}". The official XML attribute used for specifying XML Namespace
- * declarations. It is NOT valid to use as a
* prefix. Defined by the XML specification to be
- * "{@code xmlns}". W3C XML Schema Namespace URI. Defined to be "{@code http://www.w3.org/2001/XMLSchema}".
*
@@ -138,9 +138,9 @@ public final class XMLConstants {
"http://www.w3.org/2001/XMLSchema";
/**
- * W3C XML Schema Instance Namespace URI. Defined to be "{@code http://www.w3.org/2001/XMLSchema-instance}". Defined to be "{@code http://www.w3.org/2001/XMLSchema-instance}".
*
* @see
@@ -150,33 +150,33 @@ public final class XMLConstants {
public static final String W3C_XML_SCHEMA_INSTANCE_NS_URI =
"http://www.w3.org/2001/XMLSchema-instance";
- /**
- * W3C XPath Datatype Namespace URI. Defined to be "{@code http://www.w3.org/2003/11/xpath-datatypes}". Defined to be "{@code http://www.w3.org/2003/11/xpath-datatypes}".
+ *
+ * @see XQuery 1.0 and XPath 2.0 Data Model
+ */
+ public static final String W3C_XPATH_DATATYPE_NS_URI = "http://www.w3.org/2003/11/xpath-datatypes";
/**
- * XML Document Type Declaration Namespace URI as an arbitrary value. Since not formally defined by any existing standard, arbitrarily define to be "{@code http://www.w3.org/TR/REC-xml}".
*/
public static final String XML_DTD_NS_URI = "http://www.w3.org/TR/REC-xml";
/**
- * RELAX NG Namespace URI. Defined to be "{@code http://relaxng.org/ns/structure/1.0}". Defined to be "{@code http://relaxng.org/ns/structure/1.0}".
*
* @see RELAX NG Specification
*/
public static final String RELAXNG_NS_URI = "http://relaxng.org/ns/structure/1.0";
/**
- * Feature for secure processing. Property: accessExternalDTD
* Restrict access to external DTDs and external Entity References to the protocols specified.
* If access is denied due to the restriction of this property, a runtime exception that
* is specific to the context is thrown. In the case of {@link javax.xml.parsers.SAXParser}
* for example, {@link org.xml.sax.SAXException} is thrown.
- *
* Value: a list of protocols separated by comma. A protocol is the scheme portion of a
@@ -221,7 +220,6 @@ public final class XMLConstants {
* Examples of protocols are file, http, jar:file.
*
*
- *
* Default value: The default value is implementation specific and therefore not specified.
@@ -231,20 +229,19 @@ public final class XMLConstants {
*
* Granting all access: the keyword "all" grants permission to all protocols.
- *
* System Property: The value of this property can be set or overridden by
* system property {@code javax.xml.accessExternalDTD}.
- *
* jaxp.properties: This configuration file is in standard
@@ -252,11 +249,8 @@ public final class XMLConstants {
* directory of the Java installation. If the file exists and the system
* property is specified, its value will be used to override the default
* of the property.
- *
*
- * ReverseState
- * @param certStores list of CertStores
- */
- @Override
- Collection> adjacencyList,
- LinkedList
> adjList,
- LinkedList
buildForward parameter which allows
- * the caller to specify whether or not the path should be constructed in
- * the forward direction.
- *
- * The default for the buildForward parameter is
- * true, which means that the build algorithm should construct paths
- * from the target subject back to the trusted anchor.
- *
- * @since 1.4
- * @author Sean Mullan
- * @author Yassir Elley
- */
-public class SunCertPathBuilderParameters extends PKIXBuilderParameters {
-
- private boolean buildForward = true;
-
- /**
- * Creates an instance of SunCertPathBuilderParameters with the
- * specified parameter values.
- *
- * @param trustAnchors a Set of TrustAnchors
- * @param targetConstraints a CertSelector specifying the
- * constraints on the target certificate
- * @throws InvalidAlgorithmParameterException if the specified
- * Set is empty (trustAnchors.isEmpty() == true)
- * @throws NullPointerException if the specified Set is
- * null
- * @throws ClassCastException if any of the elements in the Set
- * are not of type java.security.cert.TrustAnchor
- */
- public SunCertPathBuilderParameters(SetSunCertPathBuilderParameters that
- * uses the specified KeyStore to populate the set
- * of most-trusted CA certificates.
- *
- * @param keystore A keystore from which the set of most-trusted
- * CA certificates will be populated.
- * @param targetConstraints a CertSelector specifying the
- * constraints on the target certificate
- * @throws KeyStoreException if the keystore has not been initialized.
- * @throws InvalidAlgorithmParameterException if the keystore does
- * not contain at least one trusted certificate entry
- * @throws NullPointerException if the keystore is null
- */
- public SunCertPathBuilderParameters(KeyStore keystore,
- CertSelector targetConstraints)
- throws KeyStoreException, InvalidAlgorithmParameterException
- {
- super(keystore, targetConstraints);
- setBuildForward(true);
- }
-
- /**
- * Returns the value of the buildForward flag.
- *
- * @return the value of the buildForward flag
- */
- public boolean getBuildForward() {
- return this.buildForward;
- }
-
- /**
- * Sets the value of the buildForward flag. If true, paths
- * are built from the target subject to the trusted anchor.
- * If false, paths are built from the trusted anchor to the
- * target subject. The default value if not specified is true.
- *
- * @param buildForward the value of the buildForward flag
- */
- public void setBuildForward(boolean buildForward) {
- this.buildForward = buildForward;
- }
-
- /**
- * Returns a formatted string describing the parameters.
- *
- * @return a formatted string describing the parameters.
- */
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("[\n");
- sb.append(super.toString());
- sb.append(" Build Forward Flag: " + String.valueOf(buildForward) + "\n");
- sb.append("]\n");
- return sb.toString();
- }
-}
diff --git a/jdk/test/sun/security/provider/certpath/ReverseBuilder/BuildPath.java b/jdk/test/sun/security/provider/certpath/ReverseBuilder/BuildPath.java
deleted file mode 100644
index 28ff643bd64..00000000000
--- a/jdk/test/sun/security/provider/certpath/ReverseBuilder/BuildPath.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2007, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * @test
- * @bug 6511784
- * @summary Make sure that building a path to a CRL issuer works in the
- * reverse direction
- * @library ../../../../../java/security/testlibrary
- * @build CertUtils
- * @run main BuildPath
- */
-import java.security.cert.*;
-import java.util.Collections;
-import sun.security.provider.certpath.SunCertPathBuilderParameters;
-
-public class BuildPath {
-
- public static void main(String[] args) throws Exception {
-
- TrustAnchor anchor =
- new TrustAnchor(CertUtils.getCertFromFile("mgrM2mgrM"), null);
- X509Certificate target = CertUtils.getCertFromFile("mgrM2leadMA");
- X509CertSelector xcs = new X509CertSelector();
- xcs.setSubject("CN=leadMA,CN=mgrM,OU=prjM,OU=divE,OU=Comp,O=sun,C=us");
- xcs.setCertificate(target);
- SunCertPathBuilderParameters params =
- new SunCertPathBuilderParameters(Collections.singleton(anchor),xcs);
- params.setBuildForward(false);
- CertStore cs = CertUtils.createStore(new String[]
- {"mgrM2prjM", "prjM2mgrM", "prjM2divE", "mgrM2leadMA" });
- params.addCertStore(cs);
- CertStore cs2 = CertUtils.createCRLStore
- (new String[] {"mgrMcrl", "prjMcrl"});
- params.addCertStore(cs2);
- PKIXCertPathBuilderResult res = CertUtils.build(params);
- }
-}
diff --git a/jdk/test/sun/security/provider/certpath/ReverseBuilder/ReverseBuild.java b/jdk/test/sun/security/provider/certpath/ReverseBuilder/ReverseBuild.java
deleted file mode 100644
index abb18ebd439..00000000000
--- a/jdk/test/sun/security/provider/certpath/ReverseBuilder/ReverseBuild.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright (c) 2012, 2014, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//
-// Security properties, once set, cannot revert to unset. To avoid
-// conflicts with tests running in the same VM isolate this test by
-// running it in otherVM mode.
-//
-
-/*
- * @test
- * @bug 7167988
- * @summary PKIX CertPathBuilder in reverse mode doesn't work if more than
- * one trust anchor is specified
- * @run main/othervm ReverseBuild
- */
-import java.io.*;
-import java.util.*;
-import java.security.cert.*;
-import java.security.Security;
-
-import sun.security.provider.certpath.SunCertPathBuilderParameters;
-
-public class ReverseBuild {
- // Certificate information:
- // Issuer: C=US, ST=Some-State, L=Some-City, O=Some-Org
- // Validity
- // Not Before: Dec 8 02:43:36 2008 GMT
- // Not After : Aug 25 02:43:36 2028 GMT
- // Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org
- // X509v3 Subject Key Identifier:
- // FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14
- // X509v3 Authority Key Identifier:
- // keyid:FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14
- // DirName:/C=US/ST=Some-State/L=Some-City/O=Some-Org
- // serial:00
- static String NoiceTrusedCertStr =
- "-----BEGIN CERTIFICATE-----\n" +
- "MIICrDCCAhWgAwIBAgIBADANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET\n" +
- "MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK\n" +
- "EwhTb21lLU9yZzAeFw0wODEyMDgwMjQzMzZaFw0yODA4MjUwMjQzMzZaMEkxCzAJ\n" +
- "BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp\n" +
- "dHkxETAPBgNVBAoTCFNvbWUtT3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB\n" +
- "gQDLxDggB76Ip5OwoUNRLdeOha9U3a2ieyNbz5kTU5lFfe5tui2/461uPZ8a+QOX\n" +
- "4BdVrhEmV94BKY4FPyH35zboLjfXSKxT1mAOx1Bt9sWF94umxZE1cjyU7vEX8HHj\n" +
- "7BvOyk5AQrBt7moO1uWtPA/JuoJPePiJl4kqlRJM2Akq6QIDAQABo4GjMIGgMB0G\n" +
- "A1UdDgQWBBT6uVG/TOfZhpgz+efLHvEzSfeoFDBxBgNVHSMEajBogBT6uVG/TOfZ\n" +
- "hpgz+efLHvEzSfeoFKFNpEswSTELMAkGA1UEBhMCVVMxEzARBgNVBAgTClNvbWUt\n" +
- "U3RhdGUxEjAQBgNVBAcTCVNvbWUtQ2l0eTERMA8GA1UEChMIU29tZS1PcmeCAQAw\n" +
- "DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQBcIm534U123Hz+rtyYO5uA\n" +
- "ofd81G6FnTfEAV8Kw9fGyyEbQZclBv34A9JsFKeMvU4OFIaixD7nLZ/NZ+IWbhmZ\n" +
- "LovmJXyCkOufea73pNiZ+f/4/ScZaIlM/PRycQSqbFNd4j9Wott+08qxHPLpsf3P\n" +
- "6Mvf0r1PNTY2hwTJLJmKtg==\n" +
- "-----END CERTIFICATE-----";
-
- // Certificate information:
- // Issuer: C=US, O=Java, OU=SunJSSE Test Serivce
- // Validity
- // Not Before: Aug 19 01:52:19 2011 GMT
- // Not After : Jul 29 01:52:19 2032 GMT
- // Subject: C=US, O=Java, OU=SunJSSE Test Serivce
-
- // X509v3 Subject Key Identifier:
- // B9:7C:D5:D9:DF:A7:4C:03:AE:FD:0E:27:5B:31:95:6C:C7:F3:75:E1
- // X509v3 Authority Key Identifier:
- // keyid:B9:7C:D5:D9:DF:A7:4C:03:AE:FD:0E:27:5B:31:95:6C:C7:F3:75:E1
- // DirName:/C=US/O=Java/OU=SunJSSE Test Serivce
- // serial:00
- static String NoiceTrusedCertStr_2nd =
- "-----BEGIN CERTIFICATE-----\n" +
- "MIICkjCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJVUzEN\n" +
- "MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" +
- "MTEwODE5MDE1MjE5WhcNMzIwNzI5MDE1MjE5WjA7MQswCQYDVQQGEwJVUzENMAsG\n" +
- "A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwgZ8wDQYJ\n" +
- "KoZIhvcNAQEBBQADgY0AMIGJAoGBAM8orG08DtF98TMSscjGsidd1ZoN4jiDpi8U\n" +
- "ICz+9dMm1qM1d7O2T+KH3/mxyox7Rc2ZVSCaUD0a3CkhPMnlAx8V4u0H+E9sqso6\n" +
- "iDW3JpOyzMExvZiRgRG/3nvp55RMIUV4vEHOZ1QbhuqG4ebN0Vz2DkRft7+flthf\n" +
- "vDld6f5JAgMBAAGjgaUwgaIwHQYDVR0OBBYEFLl81dnfp0wDrv0OJ1sxlWzH83Xh\n" +
- "MGMGA1UdIwRcMFqAFLl81dnfp0wDrv0OJ1sxlWzH83XhoT+kPTA7MQswCQYDVQQG\n" +
- "EwJVUzENMAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2\n" +
- "Y2WCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEE\n" +
- "BQADgYEALlgaH1gWtoBZ84EW8Hu6YtGLQ/L9zIFmHonUPZwn3Pr//icR9Sqhc3/l\n" +
- "pVTxOINuFHLRz4BBtEylzRIOPzK3tg8XwuLb1zd0db90x3KBCiAL6E6cklGEPwLe\n" +
- "XYMHDn9eDsaq861Tzn6ZwzMgw04zotPMoZN0mVd/3Qca8UJFucE=\n" +
- "-----END CERTIFICATE-----";
-
-
- // Certificate information:
- // Issuer: C=US, O=Java, OU=SunJSSE Test Serivce
- // Validity
- // Not Before: May 5 02:40:50 2012 GMT
- // Not After : Apr 15 02:40:50 2033 GMT
- // Subject: C=US, O=Java, OU=SunJSSE Test Serivce
- // X509v3 Subject Key Identifier:
- // DD:4E:8D:2A:11:C0:83:03:F0:AC:EB:A2:BF:F9:F2:7D:C8:69:1F:9B
- // X509v3 Authority Key Identifier:
- // keyid:DD:4E:8D:2A:11:C0:83:03:F0:AC:EB:A2:BF:F9:F2:7D:C8:69:1F:9B
- // DirName:/C=US/O=Java/OU=SunJSSE Test Serivce
- // serial:00
- static String trustedCertStr =
- "-----BEGIN CERTIFICATE-----\n" +
- "MIICkjCCAfugAwIBAgIBADANBgkqhkiG9w0BAQIFADA7MQswCQYDVQQGEwJVUzEN\n" +
- "MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" +
- "MTIwNTA1MDI0MDUwWhcNMzMwNDE1MDI0MDUwWjA7MQswCQYDVQQGEwJVUzENMAsG\n" +
- "A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwgZ8wDQYJ\n" +
- "KoZIhvcNAQEBBQADgY0AMIGJAoGBANtiq0AIJK+iVRwFrqcD7fYXTCbMYC5Qz/k6\n" +
- "AXBy7/1rI8wDhEJLE3m/+NSqiJwZcmdq2dNh/1fJFrwvzuURbc9+paOBWeHbN+Sc\n" +
- "x3huw91oPZme385VpoK3G13rSE114S/rF4DM9mz4EStFhSHXATjtdbskNOAYGLTV\n" +
- "x8uEy9GbAgMBAAGjgaUwgaIwHQYDVR0OBBYEFN1OjSoRwIMD8Kzror/58n3IaR+b\n" +
- "MGMGA1UdIwRcMFqAFN1OjSoRwIMD8Kzror/58n3IaR+boT+kPTA7MQswCQYDVQQG\n" +
- "EwJVUzENMAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2\n" +
- "Y2WCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEC\n" +
- "BQADgYEAjjkJesQrkbr36N40egybaIxw7RcqT6iy5fkAGS1JYlBDk8uSCK1o6bCH\n" +
- "ls5EpYcGeEoabSS73WRdkO1lgeyWDduO4ef8cCCSpmpT6/YdZG0QS1PtcREeVig+\n" +
- "Zr25jNemS4ADHX0aaXP4kiV/G80cR7nX5t5XCUm4bYdbwM07NgI=\n" +
- "-----END CERTIFICATE-----";
- static String trustedPrivateKey = // Private key in the format of PKCS#8
- "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBANtiq0AIJK+iVRwF\n" +
- "rqcD7fYXTCbMYC5Qz/k6AXBy7/1rI8wDhEJLE3m/+NSqiJwZcmdq2dNh/1fJFrwv\n" +
- "zuURbc9+paOBWeHbN+Scx3huw91oPZme385VpoK3G13rSE114S/rF4DM9mz4EStF\n" +
- "hSHXATjtdbskNOAYGLTVx8uEy9GbAgMBAAECgYEA2VjHkIiA0ABjkX+PqKeb+VLb\n" +
- "fxS7tSca5C8zfdRhLxAWRui0/3ihst0eCJNrBDuxvAOACovsDWyLuaUjtI2v2ysz\n" +
- "vz6SPyGy82PhQOFzyKQuQ814N6EpothpiZzF0yFchfKIGhUsdY89UrGs9nM7m6NT\n" +
- "rztYvgIu4avg2VPR2AECQQD+pFAqipR2BplQRIuuRSZfHRxvoEyDjT1xnHJsC6WP\n" +
- "I5hCLghL91MhQGWbP4EJMKYQOTRVukWlcp2Kycpf+P5hAkEA3I43gmVUAPEdyZdY\n" +
- "fatW7OaLlbbYJb6qEtpCZ1Rwe/BIvm6H6E3qSi/lpz7Ia7WDulpbF6BawHH3pRFq\n" +
- "CUY5ewJBAP3pUDqrRpBN0jB0uSeDslhjSciQ+dqvSpZv3rSYBHUvlBJhnkpJiy37\n" +
- "7ZUZhIxqYxyIPgRBolLwb+FFh7OdL+ECQCtldDic9WVmC+VheRDpCKZ+SlK/8lGi\n" +
- "7VXeShiIvcU1JysJFoa35fSI7hf1O3wt7+hX5PqGG7Un94EsJwACKEcCQQC1TWt6\n" +
- "ArKH6tRxKjOxFtqfs8fgEVYUaOr3j1jF4KBUuX2mtQtddZe3VfJ2wPsuKMMxmhkB\n" +
- "e7xWWZnJsErt2e+E";
-
- // Certificate information:
- // Issuer: C=US, O=Java, OU=SunJSSE Test Serivce
- // Validity
- // Not Before: May 5 02:40:53 2012 GMT
- // Not After : Jan 21 02:40:53 2032 GMT
- // Subject: C=US, O=Java, OU=SunJSSE Test Serivce, CN=casigner
- // X509v3 Subject Key Identifier:
- // 13:07:E0:11:07:DB:EB:33:23:87:31:D0:DB:7E:16:56:BE:11:90:0A
- // X509v3 Authority Key Identifier:
- // keyid:DD:4E:8D:2A:11:C0:83:03:F0:AC:EB:A2:BF:F9:F2:7D:C8:69:1F:9B
- // DirName:/C=US/O=Java/OU=SunJSSE Test Serivce
- // serial:00
- static String caSignerStr =
- "-----BEGIN CERTIFICATE-----\n" +
- "MIICqDCCAhGgAwIBAgIBAjANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJVUzEN\n" +
- "MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" +
- "MTIwNTA1MDI0MDUzWhcNMzIwMTIxMDI0MDUzWjBOMQswCQYDVQQGEwJVUzENMAsG\n" +
- "A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UxETAPBgNV\n" +
- "BAMTCGNhc2lnbmVyMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+x8+o7oM0\n" +
- "ct/LZmZLXBL4CQ8jrULD5P7NtEW0hg/zxBFZfBHf+44Oo2eMPYZj+7xaREOH5BmV\n" +
- "KRYlzRtONAaC5Ng4Mrm5UKNPcMIIUjUOvm7vWM4oSTMSfoEcSX+vp99uUAkw3w7Z\n" +
- "+frYDm1M4At/j0b+lLij71GFN2L8drpgPQIDAQABo4GoMIGlMB0GA1UdDgQWBBQT\n" +
- "B+ARB9vrMyOHMdDbfhZWvhGQCjBjBgNVHSMEXDBagBTdTo0qEcCDA/Cs66K/+fJ9\n" +
- "yGkfm6E/pD0wOzELMAkGA1UEBhMCVVMxDTALBgNVBAoTBEphdmExHTAbBgNVBAsT\n" +
- "FFN1bkpTU0UgVGVzdCBTZXJpdmNlggEAMBIGA1UdEwEB/wQIMAYBAf8CAQEwCwYD\n" +
- "VR0PBAQDAgEGMA0GCSqGSIb3DQEBBAUAA4GBAI+LXA/UCPkTANablUkt80JNPWsl\n" +
- "pS4XLNgPxWaN0bkRDs5oI4ooWAz1rwpeJ/nfetOvWlpmrVjSeovBFja5Hl+dUHTf\n" +
- "VfuyzkxXbhuNiJIpo1mVBpNsjwu9YRxuwX6UA2LTUQpgvtVJEE012x3zRvxBCbu2\n" +
- "Y/v1R5fZ4c+hXDfC\n" +
- "-----END CERTIFICATE-----";
- static String caSignerPrivateKey = // Private key in the format of PKCS#8
- "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAL7Hz6jugzRy38tm\n" +
- "ZktcEvgJDyOtQsPk/s20RbSGD/PEEVl8Ed/7jg6jZ4w9hmP7vFpEQ4fkGZUpFiXN\n" +
- "G040BoLk2DgyublQo09wwghSNQ6+bu9YzihJMxJ+gRxJf6+n325QCTDfDtn5+tgO\n" +
- "bUzgC3+PRv6UuKPvUYU3Yvx2umA9AgMBAAECgYBYvu30cW8LONyt62Zua9hPFTe7\n" +
- "qt9B7QYyfkdmoG5PQMepTrOp84SzfoOukvgvDm0huFuJnSvhXQl2cCDhkgXskvFj\n" +
- "Hh7KBCFViVXokGdq5YoS0/KYMyQV0TZfJUvILBl51uc4/siQ2tClC/N4sa+1JhgW\n" +
- "a6dFGfRjiUKSSlmMwQJBAPWpIz3Q/c+DYMvoQr5OD8EaYwYIevlTdXb97RnJJh2b\n" +
- "UnhB9jrqesJiHYVzPmP0ukyPOXOwlp2T5Am4Kw0LFOkCQQDGz150NoHOp28Mvyc4\n" +
- "CTqz/zYzUhy2eCJESl196uyP4N65Y01VYQ3JDww4DlsXiU17tVSbgA9TCcfTYOzy\n" +
- "vyw1AkARUky+1hafZCcWGZljK8PmnMKwsTZikCTvL/Zg5BMA8Wu+OQBwpQnk3OAy\n" +
- "Aa87gw0DyvGFG8Vy9POWT9sRP1/JAkBqP0hrMvYMSs6+MSn0eHo2151PsAJIQcuO\n" +
- "U2/Da1khSzu8N6WMi2GiobgV/RYRbf9KrY2ZzMZjykZQYOxAjopBAkEAghCu38cN\n" +
- "aOsW6ueo24uzsWI1FTdE+qWNVEi3RSP120xXBCyhaBjIq4WVSlJK9K2aBaJpit3j\n" +
- "iQ5tl6zrLlxQhg==";
-
- // Certificate information:
- // Issuer: C=US, O=Java, OU=SunJSSE Test Serivce, CN=casigner
- // Validity
- // Not Before: May 5 02:40:57 2012 GMT
- // Not After : Jan 21 02:40:57 2032 GMT
- // Subject: C=US, O=Java, OU=SunJSSE Test Serivce, CN=certissuer
- // X509v3 Subject Key Identifier:
- // 39:0E:C6:33:B1:50:BC:73:07:31:E5:D8:04:F7:BB:97:55:CF:9B:C8
- // X509v3 Authority Key Identifier:
- // keyid:13:07:E0:11:07:DB:EB:33:23:87:31:D0:DB:7E:16:56:BE:11:90:0A
- // DirName:/C=US/O=Java/OU=SunJSSE Test Serivce
- // serial:02
- static String certIssuerStr =
- "-----BEGIN CERTIFICATE-----\n" +
- "MIICvjCCAiegAwIBAgIBAzANBgkqhkiG9w0BAQQFADBOMQswCQYDVQQGEwJVUzEN\n" +
- "MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UxETAP\n" +
- "BgNVBAMTCGNhc2lnbmVyMB4XDTEyMDUwNTAyNDA1N1oXDTMyMDEyMTAyNDA1N1ow\n" +
- "UDELMAkGA1UEBhMCVVMxDTALBgNVBAoTBEphdmExHTAbBgNVBAsTFFN1bkpTU0Ug\n" +
- "VGVzdCBTZXJpdmNlMRMwEQYDVQQDEwpjZXJ0aXNzdWVyMIGfMA0GCSqGSIb3DQEB\n" +
- "AQUAA4GNADCBiQKBgQCyz55zinU6kNL/LeiTNiBI0QWYmDG0YTotuC4D75liBNqs\n" +
- "7Mmladsh2mTtQUAwmuGaGzaZV25a+cUax0DXZoyBwdbTI09u1bUYsZcaUUKbPoCC\n" +
- "HH26e4jLFL4olW13Sv4ZAd57tIYevMw+Fp5f4fLPFGegCJTFlv2Qjpmic/cuvQID\n" +
- "AQABo4GpMIGmMB0GA1UdDgQWBBQ5DsYzsVC8cwcx5dgE97uXVc+byDBjBgNVHSME\n" +
- "XDBagBQTB+ARB9vrMyOHMdDbfhZWvhGQCqE/pD0wOzELMAkGA1UEBhMCVVMxDTAL\n" +
- "BgNVBAoTBEphdmExHTAbBgNVBAsTFFN1bkpTU0UgVGVzdCBTZXJpdmNlggECMBMG\n" +
- "A1UdEwEB/wQJMAcBAf8CAgQAMAsGA1UdDwQEAwIBBjANBgkqhkiG9w0BAQQFAAOB\n" +
- "gQCQTagenCdClT98C+oTJGJrw/dUBD9K3tE6ZJKPMc/2bUia8G5ei1C0eXj4mWG2\n" +
- "lu9umR6C90/A6qB050QB2h50qtqxSrkpu+ym1yypauZpg7U3nUY9wZWJNI1vqrQZ\n" +
- "pqUMRcXY3iQIVKx+Qj+4/Za1wwFQzpEoGmqRW31V1SdMEw==\n" +
- "-----END CERTIFICATE-----";
- static String certIssuerPrivateKey = // Private key in the format of PKCS#8
- "MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBALLPnnOKdTqQ0v8t\n" +
- "6JM2IEjRBZiYMbRhOi24LgPvmWIE2qzsyaVp2yHaZO1BQDCa4ZobNplXblr5xRrH\n" +
- "QNdmjIHB1tMjT27VtRixlxpRQps+gIIcfbp7iMsUviiVbXdK/hkB3nu0hh68zD4W\n" +
- "nl/h8s8UZ6AIlMWW/ZCOmaJz9y69AgMBAAECgYEAjtew2tgm4gxDojqIauF4VPM1\n" +
- "pzsdqd1p3pAdomNLgrQiBLZ8N7oiph6TNb1EjA+OXc+ThFgF/oM9ZDD8qZZwcvjN\n" +
- "qDZlpTkFs2TaGcyEZfUaMB45NHVs6Nn+pSkagSNwwy3xeyAct7sQEzGNTDlEwVv5\n" +
- "7V9LQutQtBd6xT48KzkCQQDpNRfv2OFNG/6GtzJoO68oJhpnpl2MsYNi4ntRkre/\n" +
- "6uXpiCYaDskcrPMRwOOs0m7mxG+Ev+uKnLnSoEMm1GCbAkEAxEmDtiD0Psb8Z9BL\n" +
- "ZRb83Jqho3xe2MCAh3xUfz9b/Mhae9dZ44o4OCgQZuwvW1mczF0NtpgZl93BmYa2\n" +
- "hTwHhwJBAKHrEj6ep/fA6x0gD2idoATRR94VfbiU+7NpqtO9ecVP0+gsdr/66hn1\n" +
- "3yLBeZLh3MxvMTrLgkAQh1i9m0JXjOcCQQClLXAHHegrw+u3uNMZeKTFR+Lp3sk6\n" +
- "AZSnbvr0Me9I45kxSeG81x3ENALJecvIRbrrRws5MvmmkNhQR8rkh8WVAkEAk6b+\n" +
- "aVtmBgUaTS5+FFlHGHJY9HFrfT1a1C/dwyMuqlmbC3YsBmZaMOlKli5TXNybLff8\n" +
- "5KMeGEpXMzgC7AscGA==";
-
- // Certificate information:
- // Issuer: C=US, O=Java, OU=SunJSSE Test Serivce, CN=certissuer
- // Validity
- // Not Before: May 5 02:41:01 2012 GMT
- // Not After : Jan 21 02:41:01 2032 GMT
- // Subject: C=US, O=Java, OU=SunJSSE Test Serivce, CN=localhost
- // X509v3 Subject Key Identifier:
- // AD:C0:2C:4C:E4:C2:2E:A1:BB:5D:92:BE:66:E0:4E:E0:0D:2F:11:EF
- // X509v3 Authority Key Identifier:
- // keyid:39:0E:C6:33:B1:50:BC:73:07:31:E5:D8:04:F7:BB:97:55:CF:9B:C8
- static String targetCertStr =
- "-----BEGIN CERTIFICATE-----\n" +
- "MIICjTCCAfagAwIBAgIBBDANBgkqhkiG9w0BAQQFADBQMQswCQYDVQQGEwJVUzEN\n" +
- "MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UxEzAR\n" +
- "BgNVBAMTCmNlcnRpc3N1ZXIwHhcNMTIwNTA1MDI0MTAxWhcNMzIwMTIxMDI0MTAx\n" +
- "WjBPMQswCQYDVQQGEwJVUzENMAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNT\n" +
- "RSBUZXN0IFNlcml2Y2UxEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0B\n" +
- "AQEFAAOBjQAwgYkCgYEAvwaUd7wmBSKqycEstYLWD26vkU08DM39EtaT8wL9HnQ0\n" +
- "fgPblwBFI4zdLa2cuYXRZcFUb04N8nrkcpR0D6kkE+AlFAoRWrrZF80B7JTbtEK4\n" +
- "1PIeurihXvUT+4MpzGLOojIihMfvM4ufelblD56SInso4WFHm7t4qCln88J1gjkC\n" +
- "AwEAAaN4MHYwCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBStwCxM5MIuobtdkr5m4E7g\n" +
- "DS8R7zAfBgNVHSMEGDAWgBQ5DsYzsVC8cwcx5dgE97uXVc+byDAnBgNVHSUEIDAe\n" +
- "BggrBgEFBQcDAQYIKwYBBQUHAwIGCCsGAQUFBwMDMA0GCSqGSIb3DQEBBAUAA4GB\n" +
- "AGfwcfdvEG/nSCiAn2MGbYHp34mgF3OA1SJLWUW0LvWJhwm2cn4AXlSoyvbwrkaB\n" +
- "IDDCwhJvvc0vUyL2kTx7sqVaFTq3mDs+ktlB/FfH0Pb+i8FE+g+7T42Iw/j0qxHL\n" +
- "YmgbrjBQf5WYN1AvBE/rrPt9aOtS3UsqtVGW574b0shW\n" +
- "-----END CERTIFICATE-----";
- static String targetPrivateKey = // Private key in the format of PKCS#8
- "MIICdAIBADANBgkqhkiG9w0BAQEFAASCAl4wggJaAgEAAoGBAL8GlHe8JgUiqsnB\n" +
- "LLWC1g9ur5FNPAzN/RLWk/MC/R50NH4D25cARSOM3S2tnLmF0WXBVG9ODfJ65HKU\n" +
- "dA+pJBPgJRQKEVq62RfNAeyU27RCuNTyHrq4oV71E/uDKcxizqIyIoTH7zOLn3pW\n" +
- "5Q+ekiJ7KOFhR5u7eKgpZ/PCdYI5AgMBAAECf3CscOYvFD3zNMnMJ5LomVqA7w3F\n" +
- "gKYM2jlCWAH+wU41PMEXhW6Lujw92jgXL1o+lERwxFzirVdZJWZwKgUSvzP1G0h3\n" +
- "fkucq1/UWnToK+8NSXNM/yS8hXbBgSEoJo5f7LKcIi1Ev6doBVofMxs+njzyWKbM\n" +
- "Nb7rOLHadghoon0CQQDgQzbzzSN8Dc1YmmylhI5v+0sQRHH0DL7D24k4Weh4vInG\n" +
- "EAbt4x8M7ZKEo8/dv0s4hbmNmAnJl93/RRxIyEqLAkEA2g87DiswSQam2pZ8GlrO\n" +
- "+w4Qg9mH8uxx8ou2rl0XlHzH1XiTNbkjfY0EZoL7L31BHFk9n11Fb2P85g6ws+Hy\n" +
- "ywJAM/xgyLNM/nzUlS128geAXUULaYH0SHaL4isJ7B4rXZGW/mrIsGxtzjlkNYsj\n" +
- "rGujrD6TfNc5rZmexIXowJZtcQJBAIww+pCzZ4mrgx5JXWQ8OZHiiu+ZrPOa2+9J\n" +
- "r5sOMpi+WGN/73S8oHqZbNjTINZ5OqEVJq8MchWZPQBTNXuQql0CQHEjUzzkCQa3\n" +
- "j6JTa2KAdqyvLOx0XF9zcc1gA069uNQI2gPUHS8V215z57f/gMGnDNhVfLs/vMKz\n" +
- "sFkVZ3zg7As=";
-
-
- public static void main(String args[]) throws Exception {
- // MD5 is used in this test case, don't disable MD5 algorithm.
- Security.setProperty(
- "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024");
-
- // generate certificate from cert string
- CertificateFactory cf = CertificateFactory.getInstance("X.509");
-
- // create a set of trust anchors
- LinkedHashSetQ0Mms18+4Vf3;7civNrxv_
Z%Pl04DZ`@CDQ*{A-h0h!xm4mLgg1e8e+oR&vP2}oLKhI
zMy#qkq^4Kn!Qypt+MAb^PRv_e&;3i$H0k5-q$)-g>oZF}?pqN!p>sv^{fALc=d(@f
zPK#@(4pmKI^s)YT-cyUYv6TVjj?cH0Z*5QDonyRzf7q6NEUV+{wn=3F0uKL&_^Fj&BV8Azd|NoIWp105!jtX&ba?L^X9*_wmn
jI7}s#8Q7R4m_#IR$Eb$d@V30+yd`PC{%A_*nV-J^-Qo}B
diff --git a/jdk/test/sun/security/provider/certpath/ReverseBuilder/prjM2mgrM b/jdk/test/sun/security/provider/certpath/ReverseBuilder/prjM2mgrM
deleted file mode 100644
index 4004685dce2018e8492b4376546a4378e9814b99..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 771
zcmXqLV)}2;#I$z-GZP~d6N|+|wJiqRZ0uTX9_K7rm{}PNJPf%FIN6v(S=fY`N{bD7
z47flXE@9^4(mX?6pjsf0TbRW;Keqsho03`Pio`7_%JMak6X!KBFf=eQF)}hRFg1-5
z=LOQ1MwUP>P&CRQoLV-)EM^vF$xScvHE3eo0mM2mUoiqX@=T4541eo`8)Zv{G=uJY
z&Cz@F
{@code
+ * java.protocol.handler.pkgs
+ * }
+ * If the value of that system property is not {@code null},
+ * it is interpreted as a list of packages separated by a vertical
+ * slash character '{@code |}'. The constructor tries to load
+ * the class named:
+ * {@code
+ *
+ * where {@code
+ * nameserver 127.0.0.1
+ * nameserver 2001:4860:4860::8888
+ * nameserver [::1]:5353
+ * nameserver 127.0.0.1:5353
+ *
+ *
+ * Then, run this test as manual jtreg test.
+ *
+ * @author Severin Gehwolf
+ *
+ */
+public class IPv6NameserverPlatformParsingTest {
+
+ private static boolean foundIPv6 = false;
+
+ public static void main(String[] args) {
+ Hashtable
*
+ *
* When FEATURE_SECURE_PROCESSING is enabled, it is recommended that implementations
* restrict external connections by default, though this may cause problems for applications
* that process XML/XSD/XSL with external references.
*
- *
* Value: a list of protocols separated by comma. A protocol is the scheme portion of a * {@link java.net.URI}, or in the case of the JAR protocol, "jar" plus the scheme portion @@ -290,9 +284,8 @@ public final class XMLConstants { * Examples of protocols are file, http, jar:file. * * - *
* - *+ *
* Default value: The default value is implementation specific and therefore not specified. * The following options are provided for consideration: *
@@ -300,20 +293,18 @@ public final class XMLConstants { *- * + * *an empty string to deny all access to external references; *a specific protocol, such as file, to give permission to only the protocol; *the keyword "all" to grant permission to all protocols. - *
+ *
* When FEATURE_SECURE_PROCESSING is enabled, it is recommended that implementations * restrict external connections by default, though this may cause problems for applications * that process XML/XSD/XSL with external references. *
* Granting all access: the keyword "all" grants permission to all protocols. - *
* ** System Property: The value of this property can be set or overridden by * system property {@code javax.xml.accessExternalSchema} - *
* ** jaxp.properties: This configuration file is in standard @@ -323,12 +314,11 @@ public final class XMLConstants { * of the property. * * @since 1.7 - *
*/ public static final String ACCESS_EXTERNAL_SCHEMA = "http://javax.xml.XMLConstants/property/accessExternalSchema"; /** - *Property: accessExternalStylesheet
+ * Property: accessExternalStylesheet * ** Restrict access to the protocols specified for external references set by the @@ -338,7 +328,7 @@ public final class XMLConstants { * {@link javax.xml.transform.Transformer} for example, * {@link javax.xml.transform.TransformerConfigurationException} * will be thrown by the {@link javax.xml.transform.TransformerFactory}. - *
+ * ** Value: a list of protocols separated by comma. A protocol is the scheme portion of a * {@link java.net.URI}, or in the case of the JAR protocol, "jar" plus the scheme portion @@ -358,9 +348,8 @@ public final class XMLConstants { * Examples of protocols are file, http, jar:file. * * - *
* - *+ *
* Default value: The default value is implementation specific and therefore not specified. * The following options are provided for consideration: *
@@ -368,20 +357,18 @@ public final class XMLConstants { *- * + * *an empty string to deny all access to external references; *a specific protocol, such as file, to give permission to only the protocol; *the keyword "all" to grant permission to all protocols. - *
+ *
* When FEATURE_SECURE_PROCESSING is enabled, it is recommended that implementations * restrict external connections by default, though this may cause problems for applications * that process XML/XSD/XSL with external references. *
* Granting all access: the keyword "all" grants permission to all protocols. - *
* ** System Property: The value of this property can be set or overridden by * system property {@code javax.xml.accessExternalStylesheet} - *
* *
* jaxp.properties: This configuration file is in standard
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java
index d3afb25888e..001b682e42b 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java
@@ -32,11 +32,10 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
- * Factory that creates new javax.xml.datatype Objects that map XML to/from Java Objects.
+ * Factory that creates new {@code javax.xml.datatype} {@code Object}s that map XML to/from Java {@code Object}s.
*
* A new instance of the {@code DatatypeFactory} is created through the {@link #newInstance()} method * that uses the following implementation resolution mechanisms to determine an implementation: - *
*
Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.
+ * Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3. * - *Default value is {@code javax.xml.datatype.DatatypeFactory}.
+ *Default value is {@code javax.xml.datatype.DatatypeFactory}. */ public static final String DATATYPEFACTORY_PROPERTY = // We use a String constant here, rather than calling @@ -100,16 +99,15 @@ public abstract class DatatypeFactory { "javax.xml.datatype.DatatypeFactory"; /** - *
Default implementation class name as defined in - * JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.
+ * Default implementation class name as defined in + * JSR 206: Java(TM) API for XML Processing (JAXP) 1.3. * *Implementers should specify the name of an appropriate class * to be instantiated if no other implementation resolution mechanism - * succeeds.
+ * succeeds. * *Users should not refer to this field; it is intended only to * document a factory implementation detail. - *
*/ public static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS = // We use new String() here to prevent javadoc from generating @@ -130,18 +128,18 @@ public abstract class DatatypeFactory { Pattern.compile("[^YM]*[DT].*"); /** - *Protected constructor to prevent instantiation outside of package.
+ * Protected constructor to prevent instantiation outside of package. * - *Use {@link #newInstance()} to create a {@code DatatypeFactory}.
+ *Use {@link #newInstance()} to create a {@code DatatypeFactory}. */ protected DatatypeFactory() { } /** - *
Obtain a new instance of a {@code DatatypeFactory}.
+ * Obtain a new instance of a {@code DatatypeFactory}. * *The implementation resolution mechanisms are defined in this
- * Class's documentation.
Obtain a new instance of a {@code DatatypeFactory} from class name. + * Obtain a new instance of a {@code DatatypeFactory} from class name. * This function is useful when there are multiple providers in the classpath. * It gives more control to the application as it can specify which provider - * should be loaded.
+ * should be loaded. * *Once an application has obtained a reference to a {@code DatatypeFactory} - * it can use the factory to configure and obtain datatype instances.
+ * it can use the factory to configure and obtain datatype instances. * * *Setting the jaxp.debug system property will cause
+ *
Setting the {@code jaxp.debug} system property will cause
* this method to print a lot of debug messages
- * to System.err about what it is doing and where it is looking at.
If you have problems try:
+ *If you have problems try: *
* java -Djaxp.debug=1 YourProgram ....
*
*
* @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.datatype.DatatypeFactory}.
*
- * @param classLoader ClassLoader used to load the factory class. If null
- * current Thread's context classLoader is used to load the factory class.
+ * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+ * current {@code Thread}'s context classLoader is used to load the factory class.
*
* @return New instance of a {@code DatatypeFactory}
*
- * @throws DatatypeConfigurationException if factoryClassName is null, or
+ * @throws DatatypeConfigurationException if {@code factoryClassName} is {@code null}, or
* the factory class cannot be loaded, instantiated.
*
* @see #newInstance()
@@ -201,11 +199,11 @@ public abstract class DatatypeFactory {
}
/**
- * Obtain a new instance of a Duration
- * specifying the Duration as its string representation, "PnYnMnDTnHnMnS",
- * as defined in XML Schema 1.0 section 3.2.6.1.
XML Schema Part 2: Datatypes, 3.2.6 duration, defines duration as:
XML Schema Part 2: Datatypes, 3.2.6 duration, defines {@code duration} as: *
* duration represents a duration of time. * The value space of duration is a six-dimensional space where the coordinates designate the @@ -213,28 +211,28 @@ public abstract class DatatypeFactory { * These components are ordered in their significance by their order of appearance i.e. as * year, month, day, hour, minute, and second. *- *
All six values are set and available from the created {@link Duration}
+ *All six values are set and available from the created {@link Duration} * *
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits - * if implementation capacities are exceeded.
+ * if implementation capacities are exceeded. * - * @param lexicalRepresentationString representation of a Duration.
+ * @param lexicalRepresentation {@code String} representation of a {@code Duration}.
*
- * @return New Duration created from parsing the lexicalRepresentation.
+ * @return New {@code Duration} created from parsing the {@code lexicalRepresentation}.
*
- * @throws IllegalArgumentException If lexicalRepresentation is not a valid representation of a Duration.
+ * @throws IllegalArgumentException If {@code lexicalRepresentation} is not a valid representation of a {@code Duration}.
* @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException if lexicalRepresentation is null.
+ * @throws NullPointerException if {@code lexicalRepresentation} is {@code null}.
*/
public abstract Duration newDuration(final String lexicalRepresentation);
/**
- * Obtain a new instance of a Duration
- * specifying the Duration as milliseconds.
XML Schema Part 2: Datatypes, 3.2.6 duration, defines duration as:
XML Schema Part 2: Datatypes, 3.2.6 duration, defines {@code duration} as: *
* duration represents a duration of time. * The value space of duration is a six-dimensional space where the coordinates designate the @@ -243,8 +241,8 @@ public abstract class DatatypeFactory { * year, month, day, hour, minute, and second. **
All six values are set by computing their values from the specified milliseconds
- * and are available using the get methods of the created {@link Duration}.
- * The values conform to and are defined by:
Duration representing durationInMilliSeconds.
+ * @return New {@code Duration} representing {@code durationInMilliSeconds}.
*/
public abstract Duration newDuration(final long durationInMilliSeconds);
/**
- * Obtain a new instance of a Duration
- * specifying the Duration as isPositive, years, months, days, hours, minutes, seconds.
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits - * if implementation capacities are exceeded.
+ * if implementation capacities are exceeded. * - *A null value indicates that field is not set.
A {@code null} value indicates that field is not set.
*
- * @param isPositive Set to false to create a negative duration. When the length
+ * @param isPositive Set to {@code false} to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param years of this Duration
- * @param months of this Duration
- * @param days of this Duration
- * @param hours of this Duration
- * @param minutes of this Duration
- * @param seconds of this Duration
+ * @param years of this {@code Duration}
+ * @param months of this {@code Duration}
+ * @param days of this {@code Duration}
+ * @param hours of this {@code Duration}
+ * @param minutes of this {@code Duration}
+ * @param seconds of this {@code Duration}
*
- * @return New Duration created from the specified values.
+ * @return New {@code Duration} created from the specified values.
*
* @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration: if all the fields (years, months, ...) are null or
+ * {@code Duration}: if all the fields (years, months, ...) are null or
* if any of the fields is negative.
* @throws UnsupportedOperationException If implementation cannot support requested values.
*/
@@ -304,24 +302,24 @@ public abstract class DatatypeFactory {
final BigDecimal seconds);
/**
- *
Obtain a new instance of a Duration
- * specifying the Duration as isPositive, years, months, days, hours, minutes, seconds.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
- * @param isPositive Set to false to create a negative duration. When the length
+ * @param isPositive Set to {@code false} to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param years of this Duration
- * @param months of this Duration
- * @param days of this Duration
- * @param hours of this Duration
- * @param minutes of this Duration
- * @param seconds of this Duration
+ * @param years of this {@code Duration}
+ * @param months of this {@code Duration}
+ * @param days of this {@code Duration}
+ * @param hours of this {@code Duration}
+ * @param minutes of this {@code Duration}
+ * @param seconds of this {@code Duration}
*
- * @return New Duration created from the specified values.
+ * @return New {@code Duration} created from the specified values.
*
* @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration: if any of the fields is negative.
+ * {@code Duration}: if any of the fields is negative.
*
* @see #newDuration(
* boolean isPositive,
@@ -371,28 +369,30 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Duration of type xdt:dayTimeDuration by parsing its String representation,
+ * Create a {@code Duration} of type {@code xdt:dayTimeDuration}
+ * by parsing its {@code String} representation,
* "PnDTnHnMnS",
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration is a subtype of xs:duration
+ *
The datatype {@code xdt:dayTimeDuration} is a subtype of {@code xs:duration}
* whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes.
All four values are set and available from the created {@link Duration}
+ *All four values are set and available from the created {@link Duration} * *
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits - * if implementation capacities are exceeded.
+ * if implementation capacities are exceeded. * * @param lexicalRepresentation Lexical representation of a duration. * - * @return NewDuration created using the specified lexicalRepresentation.
+ * @return New {@code Duration} created using the specified {@code lexicalRepresentation}.
*
- * @throws IllegalArgumentException If lexicalRepresentation is not a valid representation of a Duration expressed only in terms of days and time.
+ * @throws IllegalArgumentException If {@code lexicalRepresentation} is
+ * not a valid representation of a {@code Duration} expressed only in terms of days and time.
* @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException If lexicalRepresentation is null.
+ * @throws NullPointerException If {@code lexicalRepresentation} is {@code null}.
*/
public Duration newDurationDayTime(final String lexicalRepresentation) {
// lexicalRepresentation must be non-null
@@ -415,17 +415,18 @@ public abstract class DatatypeFactory {
}
/**
- * Create a Duration of type xdt:dayTimeDuration using the specified milliseconds as defined in
+ * Create a {@code Duration} of type {@code xdt:dayTimeDuration}
+ * using the specified milliseconds as defined in
*
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration is a subtype of xs:duration
+ *
The datatype {@code xdt:dayTimeDuration} is a subtype of {@code xs:duration}
* whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes.
All four values are set by computing their values from the specified milliseconds
- * and are available using the get methods of the created {@link Duration}.
- * The values conform to and are defined by:
Any remaining milliseconds after determining the day, hour, minute and second are discarded.
+ *Any remaining milliseconds after determining the day, hour, minute and second are discarded.
*
- * @param durationInMilliseconds Milliseconds of Duration to create.
+ * @param durationInMilliseconds Milliseconds of {@code Duration} to create.
*
- * @return New Duration created with the specified durationInMilliseconds.
+ * @return New {@code Duration} created with the specified {@code durationInMilliseconds}.
*
* @see
* XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
@@ -457,34 +458,34 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Duration of type xdt:dayTimeDuration using the specified
- * day, hour, minute and second as defined in
+ * Create a {@code Duration} of type {@code xdt:dayTimeDuration} using the specified
+ * {@code day}, {@code hour}, {@code minute} and {@code second} as defined in
*
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration is a subtype of xs:duration
+ *
The datatype {@code xdt:dayTimeDuration} is a subtype of {@code xs:duration}
* whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes.
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits - * if implementation capacities are exceeded.
+ * if implementation capacities are exceeded. * - *A null value indicates that field is not set.
A {@code null} value indicates that field is not set.
*
- * @param isPositive Set to false to create a negative duration. When the length
+ * @param isPositive Set to {@code false} to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param day Day of Duration.
- * @param hour Hour of Duration.
- * @param minute Minute of Duration.
- * @param second Second of Duration.
+ * @param day Day of {@code Duration}.
+ * @param hour Hour of {@code Duration}.
+ * @param minute Minute of {@code Duration}.
+ * @param second Second of {@code Duration}.
*
- * @return New Duration created with the specified day, hour, minute
- * and second.
+ * @return New {@code Duration} created with the specified {@code day}, {@code hour}, {@code minute}
+ * and {@code second}.
*
* @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration: if all the fields (day, hour, ...) are null or
+ * {@code Duration}: if all the fields (day, hour, ...) are null or
* if any of the fields is negative.
* @throws UnsupportedOperationException If implementation cannot support requested values.
*/
@@ -507,29 +508,29 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Duration of type xdt:dayTimeDuration using the specified
- * day, hour, minute and second as defined in
+ * Create a {@code Duration} of type {@code xdt:dayTimeDuration} using the specified
+ * {@code day}, {@code hour}, {@code minute} and {@code second} as defined in
*
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration is a subtype of xs:duration
+ *
The datatype {@code xdt:dayTimeDuration} is a subtype of {@code xs:duration}
* whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
- * @param isPositive Set to false to create a negative duration. When the length
+ * @param isPositive Set to {@code false} to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param day Day of Duration.
- * @param hour Hour of Duration.
- * @param minute Minute of Duration.
- * @param second Second of Duration.
+ * @param day Day of {@code Duration}.
+ * @param hour Hour of {@code Duration}.
+ * @param minute Minute of {@code Duration}.
+ * @param second Second of {@code Duration}.
*
- * @return New Duration created with the specified day, hour, minute
- * and second.
+ * @return New {@code Duration} created with the specified {@code day}, {@code hour}, {@code minute}
+ * and {@code second}.
*
* @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration: if any of the fields (day, hour, ...) is negative.
+ * {@code Duration}: if any of the fields (day, hour, ...) is negative.
*/
public Duration newDurationDayTime(
final boolean isPositive,
@@ -548,28 +549,30 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Duration of type xdt:yearMonthDuration by parsing its String representation,
+ * Create a {@code Duration} of type {@code xdt:yearMonthDuration}
+ * by parsing its {@code String} representation,
* "PnYnM",
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
The datatype xdt:yearMonthDuration is a subtype of xs:duration
+ *
The datatype {@code xdt:yearMonthDuration} is a subtype of {@code xs:duration} * whose lexical representation contains only year and month components. - * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
+ * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}. * - *Both values are set and available from the created {@link Duration}
+ *Both values are set and available from the created {@link Duration} * *
The XML Schema specification states that values can be of an arbitrary size. - * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. - * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits - * if implementation capacities are exceeded.
+ * Implementations may chose not to or be incapable of supporting + * arbitrarily large and/or small values. An {@link UnsupportedOperationException} + * will be thrown with a message indicating implementation limits + * if implementation capacities are exceeded. * * @param lexicalRepresentation Lexical representation of a duration. * - * @return NewDuration created using the specified lexicalRepresentation.
+ * @return New {@code Duration} created using the specified {@code lexicalRepresentation}.
*
- * @throws IllegalArgumentException If lexicalRepresentation is not a valid representation of a Duration expressed only in terms of years and months.
+ * @throws IllegalArgumentException If {@code lexicalRepresentation} is not a valid representation of a {@code Duration} expressed only in terms of years and months.
* @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException If lexicalRepresentation is null.
+ * @throws NullPointerException If {@code lexicalRepresentation} is {@code null}.
*/
public Duration newDurationYearMonth(
final String lexicalRepresentation) {
@@ -594,17 +597,18 @@ public abstract class DatatypeFactory {
}
/**
- * Create a Duration of type xdt:yearMonthDuration using the specified milliseconds as defined in
+ * Create a {@code Duration} of type {@code xdt:yearMonthDuration}
+ * using the specified milliseconds as defined in
*
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
The datatype xdt:yearMonthDuration is a subtype of xs:duration
+ *
The datatype {@code xdt:yearMonthDuration} is a subtype of {@code xs:duration} * whose lexical representation contains only year and month components. - * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
+ * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}. * *Both values are set by computing their values from the specified milliseconds
- * and are available using the get methods of the created {@link Duration}.
- * The values conform to and are defined by:
Any remaining milliseconds after determining the year and month are discarded.
+ *Any remaining milliseconds after determining the year and month are discarded.
*
- * @param durationInMilliseconds Milliseconds of Duration to create.
+ * @param durationInMilliseconds Milliseconds of {@code Duration} to create.
*
- * @return New Duration created using the specified durationInMilliseconds.
+ * @return New {@code Duration} created using the specified {@code durationInMilliseconds}.
*/
public Duration newDurationYearMonth(
final long durationInMilliseconds) {
@@ -646,27 +650,27 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Duration of type xdt:yearMonthDuration using the specified
- * year and month as defined in
+ * Create a {@code Duration} of type {@code xdt:yearMonthDuration} using the specified
+ * {@code year} and {@code month} as defined in
*
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits - * if implementation capacities are exceeded.
+ * if implementation capacities are exceeded. * - *A null value indicates that field is not set.
A {@code null} value indicates that field is not set.
*
- * @param isPositive Set to false to create a negative duration. When the length
+ * @param isPositive Set to {@code false} to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param year Year of Duration.
- * @param month Month of Duration.
+ * @param year Year of {@code Duration}.
+ * @param month Month of {@code Duration}.
*
- * @return New Duration created using the specified year and month.
+ * @return New {@code Duration} created using the specified {@code year} and {@code month}.
*
* @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration: if all of the fields (year, month) are null or
+ * {@code Duration}: if all of the fields (year, month) are null or
* if any of the fields is negative.
* @throws UnsupportedOperationException If implementation cannot support requested values.
*/
@@ -687,22 +691,22 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Duration of type xdt:yearMonthDuration using the specified
- * year and month as defined in
+ * Create a {@code Duration} of type {@code xdt:yearMonthDuration} using the specified
+ * {@code year} and {@code month} as defined in
*
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
- * @param isPositive Set to false to create a negative duration. When the length
+ * @param isPositive Set to {@code false} to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param year Year of Duration.
- * @param month Month of Duration.
+ * @param year Year of {@code Duration}.
+ * @param month Month of {@code Duration}.
*
- * @return New Duration created using the specified year and month.
+ * @return New {@code Duration} created using the specified {@code year} and {@code month}.
*
* @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration: if any of the fields (year, month) is negative.
+ * {@code Duration}: if any of the fields (year, month) is negative.
*/
public Duration newDurationYearMonth(
final boolean isPositive,
@@ -716,44 +720,44 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a new instance of an XMLGregorianCalendar.
All date/time datatype fields set to {@link DatatypeConstants#FIELD_UNDEFINED} or null.
+ *All date/time datatype fields set to {@link DatatypeConstants#FIELD_UNDEFINED} or null.
*
- * @return New XMLGregorianCalendar with all date/time datatype fields set to
+ * @return New {@code XMLGregorianCalendar} with all date/time datatype fields set to
* {@link DatatypeConstants#FIELD_UNDEFINED} or null.
*/
public abstract XMLGregorianCalendar newXMLGregorianCalendar();
/**
- *
Create a new XMLGregorianCalendar by parsing the String as a lexical representation.
+ * Create a new XMLGregorianCalendar by parsing the String as a lexical representation. * *Parsing the lexical string representation is defined in * XML Schema 1.0 Part 2, Section 3.2.[7-14].1, - * Lexical Representation.
+ * Lexical Representation. * - *The string representation may not have any leading and trailing whitespaces.
+ *The string representation may not have any leading and trailing whitespaces. * *
The parsing is done field by field so that - * the following holds for any lexically correct String x:
+ * the following holds for any lexically correct String x: *
* newXMLGregorianCalendar(x).toXMLFormat().equals(x)
*
* Except for the noted lexical/canonical representation mismatches * listed in - * XML Schema 1.0 errata, Section 3.2.7.2.
+ * XML Schema 1.0 errata, Section 3.2.7.2. * * @param lexicalRepresentation Lexical representation of one the eight XML Schema date/time datatypes. * - * @returnXMLGregorianCalendar created from the lexicalRepresentation.
+ * @return {@code XMLGregorianCalendar} created from the {@code lexicalRepresentation}.
*
- * @throws IllegalArgumentException If the lexicalRepresentation is not a valid XMLGregorianCalendar.
- * @throws NullPointerException If lexicalRepresentation is null.
+ * @throws IllegalArgumentException If the {@code lexicalRepresentation} is not a valid {@code XMLGregorianCalendar}.
+ * @throws NullPointerException If {@code lexicalRepresentation} is {@code null}.
*/
public abstract XMLGregorianCalendar newXMLGregorianCalendar(final String lexicalRepresentation);
/**
- * Create an XMLGregorianCalendar from a {@link GregorianCalendar}.
java.util.GregorianCalendar field |
- * javax.xml.datatype.XMLGregorianCalendar field |
+ * {@code java.util.GregorianCalendar} field | + *{@code javax.xml.datatype.XMLGregorianCalendar} field | *
|---|---|---|---|
ERA == GregorianCalendar.BC ? -YEAR : YEAR |
+ * {@code ERA == GregorianCalendar.BC ? -YEAR : YEAR} | *{@link XMLGregorianCalendar#setYear(int year)} | *|
MONTH + 1 |
+ * {@code MONTH + 1} | *{@link XMLGregorianCalendar#setMonth(int month)} | *|
DAY_OF_MONTH |
+ * {@code DAY_OF_MONTH} | *{@link XMLGregorianCalendar#setDay(int day)} | *|
HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND |
+ * {@code HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND} | *{@link XMLGregorianCalendar#setTime(int hour, int minute, int second, BigDecimal fractional)} | *|
- * (ZONE_OFFSET + DST_OFFSET) / (60*1000)+ * {@code (ZONE_OFFSET + DST_OFFSET) / (60*1000)} * (in minutes) * |
* {@link XMLGregorianCalendar#setTimezone(int offset)}* @@ -796,49 +800,50 @@ public abstract class DatatypeFactory { * |
*conversion loss of information. It is not possible to represent
- * a java.util.GregorianCalendar daylight savings timezone id in the
- * XML Schema 1.0 date/time datatype representation.
To compute the return value's TimeZone field,
+ *
To compute the return value's {@code TimeZone} field, *
this.getTimezone() != FIELD_UNDEFINED,
- * create a java.util.TimeZone with a custom timezone id
- * using the this.getTimezone().GregorianCalendar default timezone value
+ * java.util.TimeZone.getDefault().java.util.GregorianCalendar used to create XMLGregorianCalendar
+ * @param cal {@code java.util.GregorianCalendar} used to create {@code XMLGregorianCalendar}
*
- * @return XMLGregorianCalendar created from java.util.GregorianCalendar
+ * @return {@code XMLGregorianCalendar} created from {@code java.util.GregorianCalendar}
*
- * @throws NullPointerException If cal is null.
+ * @throws NullPointerException If {@code cal} is {@code null}.
*/
public abstract XMLGregorianCalendar newXMLGregorianCalendar(final GregorianCalendar cal);
/**
- * Constructor allowing for complete value spaces allowed by
+ * Constructor allowing for complete value spaces allowed by
* W3C XML Schema 1.0 recommendation for xsd:dateTime and related
- * builtin datatypes. Note that year parameter supports
+ * builtin datatypes. Note that {@code year} parameter supports
* arbitrarily large numbers and fractionalSecond has infinite
- * precision.
A null value indicates that field is not set.
A {@code null} value indicates that field is not set.
*
- * @param year of XMLGregorianCalendar to be created.
- * @param month of XMLGregorianCalendar to be created.
- * @param day of XMLGregorianCalendar to be created.
- * @param hour of XMLGregorianCalendar to be created.
- * @param minute of XMLGregorianCalendar to be created.
- * @param second of XMLGregorianCalendar to be created.
- * @param fractionalSecond of XMLGregorianCalendar to be created.
- * @param timezone of XMLGregorianCalendar to be created.
+ * @param year of {@code XMLGregorianCalendar} to be created.
+ * @param month of {@code XMLGregorianCalendar} to be created.
+ * @param day of {@code XMLGregorianCalendar} to be created.
+ * @param hour of {@code XMLGregorianCalendar} to be created.
+ * @param minute of {@code XMLGregorianCalendar} to be created.
+ * @param second of {@code XMLGregorianCalendar} to be created.
+ * @param fractionalSecond of {@code XMLGregorianCalendar} to be created.
+ * @param timezone of {@code XMLGregorianCalendar} to be created.
*
- * @return XMLGregorianCalendar created from specified values.
+ * @return {@code XMLGregorianCalendar} created from specified values.
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar instance
+ * or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
*/
public abstract XMLGregorianCalendar newXMLGregorianCalendar(
@@ -852,29 +857,29 @@ public abstract class DatatypeFactory {
final int timezone);
/**
- *
Constructor of value spaces that a
- * java.util.GregorianCalendar instance would need to convert to an
- * XMLGregorianCalendar instance.
XMLGregorianCalendar eon and
- * fractionalSecond are set to null
{@code XMLGregorianCalendar eon} and + * {@code fractionalSecond} are set to {@code null} * - *
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
- * @param year of XMLGregorianCalendar to be created.
- * @param month of XMLGregorianCalendar to be created.
- * @param day of XMLGregorianCalendar to be created.
- * @param hour of XMLGregorianCalendar to be created.
- * @param minute of XMLGregorianCalendar to be created.
- * @param second of XMLGregorianCalendar to be created.
- * @param millisecond of XMLGregorianCalendar to be created.
- * @param timezone of XMLGregorianCalendar to be created.
+ * @param year of {@code XMLGregorianCalendar} to be created.
+ * @param month of {@code XMLGregorianCalendar} to be created.
+ * @param day of {@code XMLGregorianCalendar} to be created.
+ * @param hour of {@code XMLGregorianCalendar} to be created.
+ * @param minute of {@code XMLGregorianCalendar} to be created.
+ * @param second of {@code XMLGregorianCalendar} to be created.
+ * @param millisecond of {@code XMLGregorianCalendar} to be created.
+ * @param timezone of {@code XMLGregorianCalendar} to be created.
*
- * @return XMLGregorianCalendar created from specified values.
+ * @return {@code XMLGregorianCalendar} created from specified values.
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar instance
+ * or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
*/
public XMLGregorianCalendar newXMLGregorianCalendar(
@@ -918,26 +923,26 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Java representation of XML Schema builtin datatype date or g*.
For example, an instance of gYear can be created invoking this factory
- * with month and day parameters set to
- * {@link DatatypeConstants#FIELD_UNDEFINED}.
For example, an instance of {@code gYear} can be created invoking this factory + * with {@code month} and {@code day} parameters set to + * {@link DatatypeConstants#FIELD_UNDEFINED}. * - *
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
- * @param year of XMLGregorianCalendar to be created.
- * @param month of XMLGregorianCalendar to be created.
- * @param day of XMLGregorianCalendar to be created.
+ * @param year of {@code XMLGregorianCalendar} to be created.
+ * @param month of {@code XMLGregorianCalendar} to be created.
+ * @param day of {@code XMLGregorianCalendar} to be created.
* @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
*
- * @return XMLGregorianCalendar created from parameter values.
+ * @return {@code XMLGregorianCalendar} created from parameter values.
*
* @see DatatypeConstants#FIELD_UNDEFINED
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar instance
+ * or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
*/
public XMLGregorianCalendar newXMLGregorianCalendarDate(
@@ -958,20 +963,20 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Java instance of XML Schema builtin datatype time.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
* @param hours number of hours
* @param minutes number of minutes
* @param seconds number of seconds
* @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
*
- * @return XMLGregorianCalendar created from parameter values.
+ * @return {@code XMLGregorianCalendar} created from parameter values.
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar instance
+ * or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
*
* @see DatatypeConstants#FIELD_UNDEFINED
@@ -994,24 +999,24 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Java instance of XML Schema builtin datatype time.
+ * Create a Java instance of XML Schema builtin datatype time. * - *A null value indicates that field is not set.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@code null} value indicates that field is not set. + *
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
* @param hours number of hours
* @param minutes number of minutes
* @param seconds number of seconds
- * @param fractionalSecond value of null indicates that this optional field is not set.
+ * @param fractionalSecond value of {@code null} indicates that this optional field is not set.
* @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
*
- * @return XMLGregorianCalendar created from parameter values.
+ * @return {@code XMLGregorianCalendar} created from parameter values.
*
* @see DatatypeConstants#FIELD_UNDEFINED
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar instance
+ * or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
*/
public XMLGregorianCalendar newXMLGregorianCalendarTime(
@@ -1033,9 +1038,9 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Java instance of XML Schema builtin datatype time.
+ * Create a Java instance of XML Schema builtin datatype time. * - *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
* @param hours number of hours
* @param minutes number of minutes
@@ -1043,13 +1048,13 @@ public abstract class DatatypeFactory {
* @param milliseconds number of milliseconds
* @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
*
- * @return XMLGregorianCalendar created from parameter values.
+ * @return {@code XMLGregorianCalendar} created from parameter values.
*
* @see DatatypeConstants#FIELD_UNDEFINED
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar instance
+ * or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
*/
public XMLGregorianCalendar newXMLGregorianCalendarTime(
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java b/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java
index 350f4af01cc..90f016edfed 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java
@@ -35,37 +35,37 @@ import javax.xml.namespace.QName;
/**
*
Immutable representation of a time span as defined in - * the W3C XML Schema 1.0 specification.
+ * the W3C XML Schema 1.0 specification. * *A Duration object represents a period of Gregorian time, * which consists of six fields (years, months, days, hours, - * minutes, and seconds) plus a sign (+/-) field.
+ * minutes, and seconds) plus a sign (+/-) field. * - *The first five fields have non-negative (>=0) integers or null + *
The first five fields have non-negative ({@literal >=}0) integers or null * (which represents that the field is not set), * and the seconds field has a non-negative decimal or null. - * A negative sign indicates a negative duration.
+ * A negative sign indicates a negative duration. * *This class provides a number of methods that make it easy * to use for the duration datatype of XML Schema 1.0 with - * the errata.
+ * the errata. * *Duration objects only have partial order, where two values A and B - * maybe either:
+ * maybe either: *For example, 30 days cannot be meaningfully compared to one month. * The {@link #compare(Duration duration)} method implements this - * relationship.
+ * relationship. * *See the {@link #isLongerThan(Duration)} method for details about
- * the order relationship among Duration objects.
This class provides a set of basic arithmetic operations, such @@ -73,20 +73,20 @@ import javax.xml.namespace.QName; * Because durations don't have total order, an operation could * fail for some combinations of operations. For example, you cannot * subtract 15 days from 1 month. See the javadoc of those methods - * for detailed conditions where this could happen.
+ * for detailed conditions where this could happen. * *Also, division of a duration by a number is not provided because
- * the Duration class can only deal with finite precision
- * decimal numbers. For example, one cannot represent 1 sec divided by 3.
However, you could substitute a division by 3 with multiplying - * by numbers such as 0.3 or 0.333.
+ * by numbers such as 0.3 or 0.333. * *
- * Because some operations of Duration rely on {@link Calendar}
+ * Because some operations of {@code Duration} rely on {@link Calendar}
* even though {@link Duration} can hold very large or very small values,
- * some of the methods may not work correctly on such Durations.
+ * some of the methods may not work correctly on such {@code Duration}s.
* The impacted methods document their dependency on {@link Calendar}.
*
* @author Joseph Fialli
@@ -99,7 +99,7 @@ import javax.xml.namespace.QName;
public abstract class Duration {
/**
- *
Debugging true or false.
Note: Always use the {@link DatatypeFactory} to
- * construct an instance of Duration.
+ * construct an instance of {@code Duration}.
* The constructor on this class cannot be guaranteed to
* produce an object with a consistent state and may be
- * removed in the future.
Return the name of the XML Schema date/time type that this instance
+ * Return the name of the XML Schema date/time type that this instance
* maps to. Type is computed based on fields that are set,
- * i.e. {@link #isSet(DatatypeConstants.Field field)} == true.
|
- * Required fields for XML Schema 1.0 Date/Time Datatypes. + * Required fields for XML Schema 1.0 Date/Time Datatypes. * (timezone is optional for all date/time datatypes) * |
* |||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| XML Schema 1.0 - * datatype + * | XML Schema 1.0 + * datatype * field |
- * Related XMLGregorianCalendar Accessor(s) |
+ * Related XMLGregorianCalendar Accessor(s) |
* Value Range | *|
|---|---|---|---|---|---|
| year | - * {@link #getYear()} + {@link #getEon()} or + * | year | + * {@link #getYear()} + {@link #getEon()} or * {@link #getEonAndYear} * |
- * getYear() is a value between -(10^9-1) to (10^9)-1
- * or {@link DatatypeConstants#FIELD_UNDEFINED}.- * {@link #getEon()} is high order year value in billion of years. - * getEon() has values greater than or equal to (10^9) or less than or equal to -(10^9).
- * A value of null indicates field is undefined.
+ * | {@code getYear()} is a value between -(10^9-1) to (10^9)-1
+ * or {@link DatatypeConstants#FIELD_UNDEFINED}. + * {@link #getEon()} is high order year value in billion of years. + * {@code getEon()} has values greater than or equal to (10^9) or less than or equal to -(10^9). + * A value of null indicates field is undefined. * Given that XML Schema 1.0 errata states that the year zero * will be a valid lexical value in a future version of XML Schema, * this class allows the year field to be set to zero. Otherwise, @@ -89,20 +89,20 @@ import java.util.GregorianCalendar; * |
*
| month | + *month | *{@link #getMonth()} | *1 to 12 or {@link DatatypeConstants#FIELD_UNDEFINED} | *||
| day | + *day | *{@link #getDay()} | - * Independent of month, max range is 1 to 31 or {@link DatatypeConstants#FIELD_UNDEFINED}. + * | Independent of month, max range is 1 to 31 or {@link DatatypeConstants#FIELD_UNDEFINED}. * The normative value constraint stated relative to month * field's value is in W3C XML Schema 1.0 Part 2, Appendix D. * |
* |
| hour | + *hour | *{@link #getHour()} | ** 0 to 23 or {@link DatatypeConstants#FIELD_UNDEFINED}. @@ -114,28 +114,28 @@ import java.util.GregorianCalendar; * | *||
| minute | + *minute | *{@link #getMinute()} | *0 to 59 or {@link DatatypeConstants#FIELD_UNDEFINED} | *||
| second | + *second | *
- * {@link #getSecond()} + {@link #getMillisecond()}/1000 or + * {@link #getSecond()} + {@link #getMillisecond()}/1000 or * {@link #getSecond()} + {@link #getFractionalSecond()} * |
*
- * {@link #getSecond()} from 0 to 60 or {@link DatatypeConstants#FIELD_UNDEFINED}. - * (Note: 60 only allowable for leap second.) + * {@link #getSecond()} from 0 to 60 or {@link DatatypeConstants#FIELD_UNDEFINED}. + * (Note: 60 only allowable for leap second.) * {@link #getFractionalSecond()} allows for infinite precision over the range from 0.0 to 1.0 when - * the {@link #getSecond()} is defined. - * FractionalSecond is optional and has a value of null when it is undefined.+ * the {@link #getSecond()} is defined. + * {@code FractionalSecond} is optional and has a value of {@code null} when it is undefined. * {@link #getMillisecond()} is the convenience * millisecond precision of value of {@link #getFractionalSecond()}. * |
* ||
| timezone | + *timezone | *{@link #getTimezone()} | *Number of minutes or {@link DatatypeConstants#FIELD_UNDEFINED}. * Value range from -14 hours (-14 * 60 minutes) to 14 hours (14 * 60 minutes). @@ -145,14 +145,13 @@ import java.util.GregorianCalendar; * |
All maximum value space constraints listed for the fields in the table
- * above are checked by factory methods, @{link DatatypeFactory},
+ * above are checked by factory methods, {@link DatatypeFactory},
* setter methods and parse methods of
- * this class. IllegalArgumentException is thrown when a
+ * this class. {@code IllegalArgumentException} is thrown when a
* parameter's value is outside the value constraint for the field or
* if the composite
* values constitute an invalid XMLGregorianCalendar instance (for example, if
* the 31st of June is specified).
- *
The following operations are defined for this class: *
Note: Always use the {@link DatatypeFactory} to
- * construct an instance of XMLGregorianCalendar.
+ * construct an instance of {@code XMLGregorianCalendar}.
* The constructor on this class cannot be guaranteed to
* produce an object with a consistent state and may be
- * removed in the future.
Unset all fields to undefined.
+ * Unset all fields to undefined. * *Set all int fields to {@link DatatypeConstants#FIELD_UNDEFINED} and reference fields - * to null.
+ * to null. */ public abstract void clear(); /** - *Reset this XMLGregorianCalendar to its original values.
XMLGregorianCalendar is reset to the same values as when it was created with
+ *
{@code XMLGregorianCalendar} is reset to the same values as when it was created with * {@link DatatypeFactory#newXMLGregorianCalendar()}, * {@link DatatypeFactory#newXMLGregorianCalendar(String lexicalRepresentation)}, * {@link DatatypeFactory#newXMLGregorianCalendar( @@ -250,83 +248,82 @@ public abstract class XMLGregorianCalendar * int seconds, * int milliseconds, * int timezone)}. - *
* - *reset() is designed to allow the reuse of existing XMLGregorianCalendars
- * thus saving resources associated with the creation of new XMLGregorianCalendars.
{@code reset()} is designed to allow the reuse of existing {@code XMLGregorianCalendar}s + * thus saving resources associated with the creation of new {@code XMLGregorianCalendar}s. */ public abstract void reset(); /** - *
Set low and high order component of XSD dateTime year field.
Unset this field by invoking the setter with a parameter value of null.
Unset this field by invoking the setter with a parameter value of {@code null}.
*
* @param year value constraints summarized in year field of date/time field mapping table.
*
- * @throws IllegalArgumentException if year parameter is
+ * @throws IllegalArgumentException if {@code year} parameter is
* outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setYear(BigInteger year);
/**
- *
Set year of XSD dateTime year field.
Unset this field by invoking the setter with a parameter value of - * {@link DatatypeConstants#FIELD_UNDEFINED}.
+ * {@link DatatypeConstants#FIELD_UNDEFINED}. * - *Note: if the absolute value of the year parameter
+ *
Note: if the absolute value of the {@code year} parameter
* is less than 10^9, the eon component of the XSD year field is set to
- * null by this method.
null.
+ * If year is {@link DatatypeConstants#FIELD_UNDEFINED}, then eon is set to {@code null}.
*/
public abstract void setYear(int year);
/**
- * Set month.
+ * Set month. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param month value constraints summarized in month field of date/time field mapping table.
*
- * @throws IllegalArgumentException if month parameter is
+ * @throws IllegalArgumentException if {@code month} parameter is
* outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setMonth(int month);
/**
- *
Set days in month.
+ * Set days in month. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param day value constraints summarized in day field of date/time field mapping table.
*
- * @throws IllegalArgumentException if day parameter is
+ * @throws IllegalArgumentException if {@code day} parameter is
* outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setDay(int day);
/**
- *
Set the number of minutes in the timezone offset.
+ * Set the number of minutes in the timezone offset. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param offset value constraints summarized in
* timezone field of date/time field mapping table.
*
- * @throws IllegalArgumentException if offset parameter is
+ * @throws IllegalArgumentException if {@code offset} parameter is
* outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setTimezone(int offset);
/**
- *
Set time as one unit.
+ * Set time as one unit. * * @param hour value constraints are summarized in * hour field of date/time field mapping table. @@ -352,71 +349,71 @@ public abstract class XMLGregorianCalendar } /** - *Set hours.
+ * Set hours. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param hour value constraints summarized in hour field of date/time field mapping table.
*
- * @throws IllegalArgumentException if hour parameter is outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if {@code hour} parameter is outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setHour(int hour);
/**
- *
Set minutes.
+ * Set minutes. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param minute value constraints summarized in minute field of date/time field mapping table.
*
- * @throws IllegalArgumentException if minute parameter is outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if {@code minute} parameter is outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setMinute(int minute);
/**
- *
Set seconds.
+ * Set seconds. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param second value constraints summarized in second field of date/time field mapping table.
*
- * @throws IllegalArgumentException if second parameter is outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if {@code second} parameter is outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setSecond(int second);
/**
- *
Set milliseconds.
+ * Set milliseconds. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param millisecond value constraints summarized in
* second field of date/time field mapping table.
*
- * @throws IllegalArgumentException if millisecond parameter is outside value constraints for the field as specified
+ * @throws IllegalArgumentException if {@code millisecond} parameter is outside value constraints for the field as specified
* in date/time field mapping table.
*/
public abstract void setMillisecond(int millisecond);
/**
- *
Set fractional seconds.
+ * Set fractional seconds. * - *Unset this field by invoking the setter with a parameter value of null.
Unset this field by invoking the setter with a parameter value of {@code null}.
*
* @param fractional value constraints summarized in
* second field of date/time field mapping table.
*
- * @throws IllegalArgumentException if fractional parameter is outside value constraints for the field as specified
+ * @throws IllegalArgumentException if {@code fractional} parameter is outside value constraints for the field as specified
* in date/time field mapping table.
*/
public abstract void setFractionalSecond(BigDecimal fractional);
/**
- *
Set time as one unit, including the optional infinite precision - * fractional seconds.
+ * Set time as one unit, including the optional infinite precision + * fractional seconds. * * @param hour value constraints are summarized in * hour field of date/time field mapping table. @@ -424,7 +421,7 @@ public abstract class XMLGregorianCalendar * minute field of date/time field mapping table. * @param second value constraints are summarized in * second field of date/time field mapping table. - * @param fractional value ofnull indicates this optional
+ * @param fractional value of {@code null} indicates this optional
* field is not set.
*
* @throws IllegalArgumentException if any parameter is
@@ -445,7 +442,7 @@ public abstract class XMLGregorianCalendar
/**
- * Set time as one unit, including optional milliseconds.
+ * Set time as one unit, including optional milliseconds. * * @param hour value constraints are summarized in * hour field of date/time field mapping table. @@ -469,13 +466,13 @@ public abstract class XMLGregorianCalendar } /** - *Return high order component for XML Schema 1.0 dateTime datatype field for
- * year.
- * null if this optional part of the year field is not defined.
Value constraints for this value are summarized in - * year field of date/time field mapping table.
- * @return eon of thisXMLGregorianCalendar. The value
+ * year field of date/time field mapping table.
+ * @return eon of this {@code XMLGregorianCalendar}. The value
* returned is an integer multiple of 10^9.
*
* @see #getYear()
@@ -484,13 +481,13 @@ public abstract class XMLGregorianCalendar
public abstract BigInteger getEon();
/**
- * Return low order component for XML Schema 1.0 dateTime datatype field for
- * year or {@link DatatypeConstants#FIELD_UNDEFINED}.
Value constraints for this value are summarized in - * year field of date/time field mapping table.
+ * year field of date/time field mapping table. * - * @return year of thisXMLGregorianCalendar.
+ * @return year of this {@code XMLGregorianCalendar}.
*
* @see #getEon()
* @see #getEonAndYear()
@@ -498,16 +495,16 @@ public abstract class XMLGregorianCalendar
public abstract int getYear();
/**
- * Return XML Schema 1.0 dateTime datatype field for
- * year.
Value constraints for this value are summarized in - * year field of date/time field mapping table.
+ * year field of date/time field mapping table. * - * @return sum ofeon and BigInteger.valueOf(year)
- * when both fields are defined. When only year is defined,
- * return it. When both eon and year are not
- * defined, return null.
+ * @return sum of {@code eon} and {@code BigInteger.valueOf(year)}
+ * when both fields are defined. When only {@code year} is defined,
+ * return it. When both {@code eon} and {@code year} are not
+ * defined, return {@code null}.
*
* @see #getEon()
* @see #getYear()
@@ -515,21 +512,21 @@ public abstract class XMLGregorianCalendar
public abstract BigInteger getEonAndYear();
/**
- * Return number of month or {@link DatatypeConstants#FIELD_UNDEFINED}.
+ * Return number of month or {@link DatatypeConstants#FIELD_UNDEFINED}. * *Value constraints for this value are summarized in - * month field of date/time field mapping table.
+ * month field of date/time field mapping table. * - * @return year of thisXMLGregorianCalendar.
+ * @return year of this {@code XMLGregorianCalendar}.
*
*/
public abstract int getMonth();
/**
- * Return day in month or {@link DatatypeConstants#FIELD_UNDEFINED}.
+ * Return day in month or {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* Value constraints for this value are summarized in - * day field of date/time field mapping table.
+ * day field of date/time field mapping table. * * @see #setDay(int) */ @@ -540,7 +537,7 @@ public abstract class XMLGregorianCalendar * {@link DatatypeConstants#FIELD_UNDEFINED} if this optional field is not defined. * *Value constraints for this value are summarized in - * timezone field of date/time field mapping table.
+ * timezone field of date/time field mapping table. * * @see #setTimezone(int) */ @@ -551,34 +548,34 @@ public abstract class XMLGregorianCalendar * Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined. * *Value constraints for this value are summarized in - * hour field of date/time field mapping table.
+ * hour field of date/time field mapping table. * @see #setTime(int, int, int) */ public abstract int getHour(); /** - * Return minutes or {@link DatatypeConstants#FIELD_UNDEFINED}. + * Return minutes or {@link DatatypeConstants#FIELD_UNDEFINED}. * Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined. * *Value constraints for this value are summarized in - * minute field of date/time field mapping table.
+ * minute field of date/time field mapping table. * @see #setTime(int, int, int) */ public abstract int getMinute(); /** - *Return seconds or {@link DatatypeConstants#FIELD_UNDEFINED}.
+ * Return seconds or {@link DatatypeConstants#FIELD_UNDEFINED}. * *Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined. * When this field is not defined, the optional xs:dateTime * fractional seconds field, represented by * {@link #getFractionalSecond()} and {@link #getMillisecond()}, - * must not be defined.
+ * must not be defined. * *Value constraints for this value are summarized in - * second field of date/time field mapping table.
+ * second field of date/time field mapping table. * - * @return Second of thisXMLGregorianCalendar.
+ * @return Second of this {@code XMLGregorianCalendar}.
*
* @see #getFractionalSecond()
* @see #getMillisecond()
@@ -587,20 +584,20 @@ public abstract class XMLGregorianCalendar
public abstract int getSecond();
/**
- * Return millisecond precision of {@link #getFractionalSecond()}.
+ * Return millisecond precision of {@link #getFractionalSecond()}. * *This method represents a convenience accessor to infinite
* precision fractional second value returned by
* {@link #getFractionalSecond()}. The returned value is the rounded
* down to milliseconds value of
* {@link #getFractionalSecond()}. When {@link #getFractionalSecond()}
- * returns null, this method must return
- * {@link DatatypeConstants#FIELD_UNDEFINED}.
Value constraints for this value are summarized in - * second field of date/time field mapping table.
+ * second field of date/time field mapping table. * - * @return Millisecond of thisXMLGregorianCalendar.
+ * @return Millisecond of this {@code XMLGregorianCalendar}.
*
* @see #getFractionalSecond()
* @see #setTime(int, int, int)
@@ -618,18 +615,18 @@ public abstract class XMLGregorianCalendar
}
/**
- * Return fractional seconds.
+ * Return fractional seconds. * - *null is returned when this optional field is not defined.
{@code null} is returned when this optional field is not defined. * *
Value constraints are detailed in - * second field of date/time field mapping table.
+ * second field of date/time field mapping table. * *This optional field can only have a defined value when the * xs:dateTime second field, represented by {@link #getSecond()}, - * does not return {@link DatatypeConstants#FIELD_UNDEFINED}.
+ * does not return {@link DatatypeConstants#FIELD_UNDEFINED}. * - * @return fractional seconds of thisXMLGregorianCalendar.
+ * @return fractional seconds of this {@code XMLGregorianCalendar}.
*
* @see #getSecond()
* @see #setTime(int, int, int, BigDecimal)
@@ -638,51 +635,51 @@ public abstract class XMLGregorianCalendar
// comparisons
/**
- * Compare two instances of W3C XML Schema 1.0 date/time datatypes + * Compare two instances of W3C XML Schema 1.0 date/time datatypes * according to partial order relation defined in * W3C XML Schema 1.0 Part 2, Section 3.2.7.3, - * Order relation on dateTime.
+ * Order relation on dateTime. * - *xsd:dateTime datatype field mapping to accessors of
+ *
{@code xsd:dateTime} datatype field mapping to accessors of * this class are defined in - * date/time field mapping table.
+ * date/time field mapping table. * - * @param xmlGregorianCalendar Instance ofXMLGregorianCalendar to compare
+ * @param xmlGregorianCalendar Instance of {@code XMLGregorianCalendar} to compare
*
- * @return The relationship between this XMLGregorianCalendar and
- * the specified xmlGregorianCalendar as
+ * @return The relationship between {@code this} {@code XMLGregorianCalendar} and
+ * the specified {@code xmlGregorianCalendar} as
* {@link DatatypeConstants#LESSER},
* {@link DatatypeConstants#EQUAL},
* {@link DatatypeConstants#GREATER} or
* {@link DatatypeConstants#INDETERMINATE}.
*
- * @throws NullPointerException if xmlGregorianCalendar is null.
+ * @throws NullPointerException if {@code xmlGregorianCalendar} is null.
*/
public abstract int compare(XMLGregorianCalendar xmlGregorianCalendar);
/**
- * Normalize this instance to UTC.
+ * Normalize this instance to UTC. * - *2000-03-04T23:00:00+03:00 normalizes to 2000-03-04T20:00:00Z
- *Implements W3C XML Schema Part 2, Section 3.2.7.3 (A).
+ *2000-03-04T23:00:00+03:00 normalizes to 2000-03-04T20:00:00Z + *
Implements W3C XML Schema Part 2, Section 3.2.7.3 (A).
*
- * @return this XMLGregorianCalendar normalized to UTC.
+ * @return {@code this} {@code XMLGregorianCalendar} normalized to UTC.
*/
public abstract XMLGregorianCalendar normalize();
/**
- *
Compares this calendar to the specified object. The result is
- * true if and only if the argument is not null and is an
- * XMLGregorianCalendar object that represents the same
- * instant in time as this object.
true when obj is an instance of
- * XMLGregorianCalendar and
+ * @return {@code true} when {@code obj} is an instance of
+ * {@code XMLGregorianCalendar} and
* {@link #compare(XMLGregorianCalendar obj)}
* returns {@link DatatypeConstants#EQUAL},
- * otherwise false.
+ * otherwise {@code false}.
*/
public boolean equals(Object obj) {
@@ -693,7 +690,7 @@ public abstract class XMLGregorianCalendar
}
/**
- * Returns a hash code consistent with the definition of the equals method.
+ * Returns a hash code consistent with the definition of the equals method. * * @return hash code of this object. */ @@ -721,15 +718,15 @@ public abstract class XMLGregorianCalendar } /** - *Return the lexical representation of this instance.
+ * Return the lexical representation of {@code this} instance.
* The format is specified in
* XML Schema 1.0 Part 2, Section 3.2.[7-14].1,
- * Lexical Representation".
Specific target lexical representation format is determined by - * {@link #getXMLSchemaType()}.
+ * {@link #getXMLSchemaType()}. * - * @return XML, asString, representation of this XMLGregorianCalendar
+ * @return XML, as {@code String}, representation of this {@code XMLGregorianCalendar}
*
* @throws IllegalStateException if the combination of set fields
* does not match one of the eight defined XML Schema builtin date/time datatypes.
@@ -737,14 +734,14 @@ public abstract class XMLGregorianCalendar
public abstract String toXMLFormat();
/**
- * Return the name of the XML Schema date/time type that this instance - * maps to. Type is computed based on fields that are set.
+ * Return the name of the XML Schema date/time type that this instance + * maps to. Type is computed based on fields that are set. * *|
- * Required fields for XML Schema 1.0 Date/Time Datatypes. + * Required fields for XML Schema 1.0 Date/Time Datatypes. * (timezone is optional for all date/time datatypes) * |
* |||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
* Field by Field Conversion from this class to
- * java.util.GregorianCalendar
+ * {@code java.util.GregorianCalendar}
* |
* ||||
|---|---|---|---|---|
java.util.GregorianCalendar field |
- * javax.xml.datatype.XMLGregorianCalendar field |
+ * {@code java.util.GregorianCalendar} field | + *{@code javax.xml.datatype.XMLGregorianCalendar} field | *|
ERA |
- * {@link #getEonAndYear()}.signum() < 0 ? GregorianCalendar.BC : GregorianCalendar.AD |
+ * {@code ERA} | + *{@link #getEonAndYear()}{@code .signum() < 0 ? GregorianCalendar.BC : GregorianCalendar.AD} | *|
YEAR |
- * {@link #getEonAndYear()}.abs().intValue()* |
+ * {@code YEAR} | + *{@link #getEonAndYear()}{@code .abs().intValue()}* | *|
MONTH |
+ * {@code MONTH} | *{@link #getMonth()} - {@link DatatypeConstants#JANUARY} + {@link GregorianCalendar#JANUARY} | *||
DAY_OF_MONTH |
+ * {@code DAY_OF_MONTH} | *{@link #getDay()} | *||
HOUR_OF_DAY |
+ * {@code HOUR_OF_DAY} | *{@link #getHour()} | *||
MINUTE |
+ * {@code MINUTE} | *{@link #getMinute()} | *||
SECOND |
+ * {@code SECOND} | *{@link #getSecond()} | *||
MILLISECOND |
+ * {@code MILLISECOND} | *get millisecond order from {@link #getFractionalSecond()}* | *||
GregorianCalendar.setTimeZone(TimeZone) |
+ * {@code GregorianCalendar.setTimeZone(TimeZone)} | *{@link #getTimezone()} formatted into Custom timezone id | *||
- * getNamespaceURI(prefix)
+ * {@code getNamespaceURI(prefix)}
* return value for specified prefixes
* |
* |||
DEFAULT_NS_PREFIX ("") |
+ * {@code DEFAULT_NS_PREFIX} ("") | *default Namespace URI in the current scope or
- * {@link
+ * |
@@ -117,24 +117,24 @@ public interface NamespaceContext {
* |
| unbound prefix | *
- * {@link
+ * |
* ||
XMLConstants.XML_NS_PREFIX ("xml") |
- * XMLConstants.XML_NS_URI
+ * | {@code XMLConstants.XML_NS_PREFIX} ("xml") | + *{@code XMLConstants.XML_NS_URI} * ("http://www.w3.org/XML/1998/namespace") | *
XMLConstants.XMLNS_ATTRIBUTE ("xmlns") |
- * XMLConstants.XMLNS_ATTRIBUTE_NS_URI
+ * | {@code XMLConstants.XMLNS_ATTRIBUTE} ("xmlns") | + *{@code XMLConstants.XMLNS_ATTRIBUTE_NS_URI} * ("http://www.w3.org/2000/xmlns/") | *
null |
- * IllegalArgumentException is thrown |
+ * {@code null} | + *{@code IllegalArgumentException} is thrown | *
prefix is
- * null
+ * @throws IllegalArgumentException When {@code prefix} is
+ * {@code null}
*/
String getNamespaceURI(String prefix);
/**
- * Get prefix bound to Namespace URI in the current scope.
+ * Get prefix bound to Namespace URI in the current scope. * *To get all prefixes bound to a Namespace URI in the current - * scope, use {@link #getPrefixes(String namespaceURI)}.
+ * scope, use {@link #getPrefixes(String namespaceURI)}. * *When requesting a prefix by Namespace URI, the following * table describes the returned prefix value for all Namespace URI - * values:
+ * values: * *
- * getPrefix(namespaceURI) return value for
+ * {@code getPrefix(namespaceURI)} return value for
* specified Namespace URIs
* |
* |||
|---|---|---|---|
| <default Namespace URI> | - *XMLConstants.DEFAULT_NS_PREFIX ("")
+ * | {@code |
+ * {@code XMLConstants.DEFAULT_NS_PREFIX} ("") * | *
| unbound Namespace URI | - *null |
+ * {@code null} | *|
XMLConstants.XML_NS_URI
+ * | {@code XMLConstants.XML_NS_URI} * ("http://www.w3.org/XML/1998/namespace") | - *XMLConstants.XML_NS_PREFIX ("xml") |
+ * {@code XMLConstants.XML_NS_PREFIX} ("xml") | *
XMLConstants.XMLNS_ATTRIBUTE_NS_URI
+ * | {@code XMLConstants.XMLNS_ATTRIBUTE_NS_URI} * ("http://www.w3.org/2000/xmlns/") | - *XMLConstants.XMLNS_ATTRIBUTE ("xmlns") |
+ * {@code XMLConstants.XMLNS_ATTRIBUTE} ("xmlns") | *
null |
- * IllegalArgumentException is thrown |
+ * {@code null} | + *{@code IllegalArgumentException} is thrown | *
namespaceURI is
- * null
+ * @throws IllegalArgumentException When {@code namespaceURI} is
+ * {@code null}
*/
String getPrefix(String namespaceURI);
/**
- * Get all prefixes bound to a Namespace URI in the current - * scope.
+ * Get all prefixes bound to a Namespace URI in the current + * scope. * *An Iterator over String elements is returned in an arbitrary, - * implementation dependent, order.
+ * implementation dependent, order. * - *The The {@code Iterator} is
* not modifiable. e.g. the
- * Iterator is
+ * remove() method will throw
- * UnsupportedOperationException.
When requesting prefixes by Namespace URI, the following * table describes the returned prefixes value for all Namespace - * URI values:
+ * URI values: * *
- * getPrefixes(namespaceURI) return value for
+ * | {@code + * getPrefixes(namespaceURI)} return value for * specified Namespace URIs | *||
|---|---|---|---|
| bound Namespace URI, - * including the <default Namespace URI> | + * including the {@code
- * Iterator over prefixes bound to Namespace URI in
+ * {@code Iterator} over prefixes bound to Namespace URI in
* the current scope in an arbitrary,
* implementation dependent,
* order
@@ -255,34 +255,34 @@ public interface NamespaceContext {
* | ||
| unbound Namespace URI | - *empty Iterator |
+ * empty {@code Iterator} | *|
XMLConstants.XML_NS_URI
+ * | {@code XMLConstants.XML_NS_URI} * ("http://www.w3.org/XML/1998/namespace") | - *Iterator with one element set to
- * XMLConstants.XML_NS_PREFIX ("xml") |
+ * {@code Iterator} with one element set to + * {@code XMLConstants.XML_NS_PREFIX} ("xml") | *
XMLConstants.XMLNS_ATTRIBUTE_NS_URI
+ * | {@code XMLConstants.XMLNS_ATTRIBUTE_NS_URI} * ("http://www.w3.org/2000/xmlns/") | - *Iterator with one element set to
- * XMLConstants.XMLNS_ATTRIBUTE ("xmlns") |
+ * {@code Iterator} with one element set to + * {@code XMLConstants.XMLNS_ATTRIBUTE} ("xmlns") | *
null |
- * IllegalArgumentException is thrown |
+ * {@code null} | + *{@code IllegalArgumentException} is thrown | *
Iterator for all prefixes bound to the
+ * @return {@code Iterator} for all prefixes bound to the
* Namespace URI in the current scope
*
- * @throws IllegalArgumentException When namespaceURI is
- * null
+ * @throws IllegalArgumentException When {@code namespaceURI} is
+ * {@code null}
*/
Iterator getPrefixes(String namespaceURI);
}
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/parsers/DocumentBuilderFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/parsers/DocumentBuilderFactory.java
index c500869cd7f..71fed6c2c15 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/DocumentBuilderFactory.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/DocumentBuilderFactory.java
@@ -47,8 +47,8 @@ public abstract class DocumentBuilderFactory {
private boolean coalescing = false;
/**
- * Protected constructor to prevent instantiation. - * Use {@link #newInstance()}.
+ * Protected constructor to prevent instantiation. + * Use {@link #newInstance()}. */ protected DocumentBuilderFactory () { } @@ -60,7 +60,6 @@ public abstract class DocumentBuilderFactory { * This method uses the following ordered lookup procedure to determine * the {@code DocumentBuilderFactory} implementation class to * load: - **
Obtain a new instance of a {@code DocumentBuilderFactory} from class name. + * Obtain a new instance of a {@code DocumentBuilderFactory} from class name. * This function is useful when there are multiple providers in the classpath. * It gives more control to the application as it can specify which provider * should be loaded. @@ -143,21 +142,22 @@ public abstract class DocumentBuilderFactory { *
Setting the {@code jaxp.debug} system property will cause * this method to print a lot of debug messages - * to {@code System.err} about what it is doing and where it is looking at.
+ * to {@code System.err} about what it is doing and where it is looking at. * - *If you have problems try:
+ *If you have problems try: *
* java -Djaxp.debug=1 YourProgram ....
*
*
- * @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.parsers.DocumentBuilderFactory}.
+ * @param factoryClassName fully qualified factory class name that provides
+ * implementation of {@code javax.xml.parsers.DocumentBuilderFactory}.
*
- * @param classLoader ClassLoader used to load the factory class. If null
- * current Thread's context classLoader is used to load the factory class.
+ * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+ * current {@code Thread}'s context classLoader is used to load the factory class.
*
* @return New instance of a {@code DocumentBuilderFactory}
*
- * @throws FactoryConfigurationError if factoryClassName is null, or
+ * @throws FactoryConfigurationError if {@code factoryClassName} is {@code null}, or
* the factory class cannot be loaded, instantiated.
*
* @see #newInstance()
@@ -187,7 +187,7 @@ public abstract class DocumentBuilderFactory {
/**
* Specifies that the parser produced by this code will
* provide support for XML namespaces. By default the value of this is set
- * to false
+ * to {@code false}
*
* @param awareness true if the parser produced will provide support
* for XML namespaces; false otherwise.
@@ -200,7 +200,7 @@ public abstract class DocumentBuilderFactory {
/**
* Specifies that the parser produced by this code will
* validate documents as they are parsed. By default the value of this
- * is set to false.
+ * is set to {@code false}.
*
* * Note that "the validation" here means @@ -208,15 +208,13 @@ public abstract class DocumentBuilderFactory { * parser as defined in the XML recommendation. * In other words, it essentially just controls the DTD validation. * (except the legacy two properties defined in JAXP 1.2.) - *
* *
* To use modern schema languages such as W3C XML Schema or
* RELAX NG instead of DTD, you can configure your parser to be
* a non-validating parser by leaving the {@link #setValidating(boolean)}
- * method false, then use the {@link #setSchema(Schema)}
+ * method {@code false}, then use the {@link #setSchema(Schema)}
* method to associate a schema to a parser.
- *
false.
+ * the value of this is set to {@code false}.
*
* @param whitespace true if the parser created must eliminate whitespace
* in the element content when parsing XML documents;
@@ -248,7 +246,7 @@ public abstract class DocumentBuilderFactory {
/**
* Specifies that the parser produced by this code will
* expand entity reference nodes. By default the value of this is set to
- * true
+ * {@code true}
*
* @param expandEntityRef true if the parser produced will expand entity
* reference nodes; false otherwise.
@@ -259,11 +257,10 @@ public abstract class DocumentBuilderFactory {
}
/**
- * Specifies that the parser produced by this code will
- * ignore comments. By default the value of this is set to false
- * .
boolean value to ignore comments during processing
+ * @param ignoreComments {@code boolean} value to ignore comments during processing
*/
public void setIgnoringComments(boolean ignoreComments) {
@@ -274,7 +271,7 @@ public abstract class DocumentBuilderFactory {
* Specifies that the parser produced by this code will
* convert CDATA nodes to Text nodes and append it to the
* adjacent (if any) text node. By default the value of this is set to
- * false
+ * {@code false}
*
* @param coalescing true if the parser produced will convert CDATA nodes
* to Text nodes and append it to the adjacent (if any)
@@ -367,25 +364,23 @@ public abstract class DocumentBuilderFactory {
* All implementations that implement JAXP 1.5 or newer are required to
* support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} and
* {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_SCHEMA} properties.
- *
+ *
* * Setting the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} property * restricts the access to external DTDs, external Entity References to the * protocols specified by the property. * If access is denied during parsing due to the restriction of this property, * {@link org.xml.sax.SAXException} will be thrown by the parse methods defined by * {@link javax.xml.parsers.DocumentBuilder}. - *
- *+ *
Set a feature for this {@code DocumentBuilderFactory} and DocumentBuilders created by this factory.
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
* A {@link ParserConfigurationException} is thrown if this {@code DocumentBuilderFactory} or the
- * DocumentBuilders it creates cannot support the feature.
+ * {@code DocumentBuilder}s it creates cannot support the feature.
* It is possible for a {@code DocumentBuilderFactory} to expose a feature value but be unable to change its state.
- *
* All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature. - * When the feature is:
+ * When the feature is: *true: the implementation will limit XML processing to conform to implementation limits.
+ * {@code true}: the implementation will limit XML processing to conform to implementation limits.
* Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources.
* If XML processing is limited for security reasons, it will be reported via a call to the registered
* {@link org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)}.
* See {@link DocumentBuilder#setErrorHandler(org.xml.sax.ErrorHandler errorHandler)}.
* false: the implementation will processing XML according to the XML specifications without
+ * {@code false}: the implementation will processing XML according to the XML specifications without
* regard to possible implementation limits.
* true or false.
+ * @param value Is feature state {@code true} or {@code false}.
*
- * @throws ParserConfigurationException if this {@code DocumentBuilderFactory} or the DocumentBuilders
+ * @throws ParserConfigurationException if this {@code DocumentBuilderFactory} or the {@code DocumentBuilder}s
* it creates cannot support this feature.
- * @throws NullPointerException If the name parameter is null.
+ * @throws NullPointerException If the {@code name} parameter is null.
* @since 1.5
*/
public abstract void setFeature(String name, boolean value)
throws ParserConfigurationException;
/**
- * Get the state of the named feature.
+ * Get the state of the named feature. * *
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
* An {@link ParserConfigurationException} is thrown if this {@code DocumentBuilderFactory} or the
- * DocumentBuilders it creates cannot support the feature.
+ * {@code DocumentBuilder}s it creates cannot support the feature.
* It is possible for an {@code DocumentBuilderFactory} to expose a feature value but be unable to change its state.
- *
DocumentBuilders it creates cannot support this feature.
+ * or the {@code DocumentBuilder}s it creates cannot support this feature.
* @since 1.5
*/
public abstract boolean getFeature(String name)
@@ -501,7 +496,7 @@ public abstract class DocumentBuilderFactory {
}
/**
- * Set the {@link Schema} to be used by parsers created + * Set the {@link Schema} to be used by parsers created * from this factory. * *
@@ -529,26 +524,26 @@ public abstract class DocumentBuilderFactory { * *
* This processing will take effect even if
- * the {@link #isValidating()} method returns false.
+ * the {@link #isValidating()} method returns {@code false}.
*
*
It is an error to use
- * the http://java.sun.com/xml/jaxp/properties/schemaSource
- * property and/or the http://java.sun.com/xml/jaxp/properties/schemaLanguage
+ * the {@code http://java.sun.com/xml/jaxp/properties/schemaSource}
+ * property and/or the {@code http://java.sun.com/xml/jaxp/properties/schemaLanguage}
* property in conjunction with a {@link Schema} object.
* Such configuration will cause a {@link ParserConfigurationException}
- * exception when the {@link #newDocumentBuilder()} is invoked.
* A parser must be able to work with any {@link Schema} * implementation. However, parsers and schemas are allowed * to use implementation-specific custom mechanisms * as long as they yield the result described in the specification. - *
* - * @param schemaSchema to use or null
+ *
+ * @param schema {@code Schema} to use or {@code null}
* to remove a schema.
*
* @throws UnsupportedOperationException When implementation does not
@@ -569,16 +564,16 @@ public abstract class DocumentBuilderFactory {
/**
- * Set state of XInclude processing.
+ * Set state of XInclude processing. * *If XInclude markup is found in the document instance, should it be * processed as specified in - * XML Inclusions (XInclude) Version 1.0.
+ * XML Inclusions (XInclude) Version 1.0. * - *XInclude processing defaults to false.
XInclude processing defaults to {@code false}.
*
- * @param state Set XInclude processing to true or
- * false
+ * @param state Set XInclude processing to {@code true} or
+ * {@code false}
*
* @throws UnsupportedOperationException When implementation does not
* override this method.
@@ -594,7 +589,7 @@ public abstract class DocumentBuilderFactory {
}
/**
- *
Get state of XInclude processing.
+ * Get state of XInclude processing. * * @return current state of XInclude processing * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java index 1160a62edf4..1732047ee5e 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java @@ -42,17 +42,17 @@ import org.xml.sax.SAXNotSupportedException; public abstract class SAXParserFactory { /** - *Should Parsers be validating?
+ * Should Parsers be validating? */ private boolean validating = false; /** - *Should Parsers be namespace aware?
+ * Should Parsers be namespace aware? */ private boolean namespaceAware = false; /** - *Protected constructor to force use of {@link #newInstance()}.
+ * Protected constructor to force use of {@link #newInstance()}. */ protected SAXParserFactory () { @@ -64,7 +64,6 @@ public abstract class SAXParserFactory { * This method uses the following ordered lookup procedure to determine * the {@code SAXParserFactory} implementation class to * load: - **
Obtain a new instance of a {@code SAXParserFactory} from class name. + * Obtain a new instance of a {@code SAXParserFactory} from class name. * This function is useful when there are multiple providers in the classpath. * It gives more control to the application as it can specify which provider - * should be loaded.
+ * should be loaded. * *Once an application has obtained a reference to a {@code SAXParserFactory} - * it can use the factory to configure and obtain parser instances.
+ * it can use the factory to configure and obtain parser instances. * * *Setting the {@code jaxp.debug} system property will cause * this method to print a lot of debug messages - * to {@code System.err} about what it is doing and where it is looking at.
+ * to {@code System.err} about what it is doing and where it is looking at. * *
* If you have problems, try:
@@ -160,12 +159,12 @@ public abstract class SAXParserFactory {
*
* @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.parsers.SAXParserFactory}.
*
- * @param classLoader ClassLoader used to load the factory class. If null
- * current Thread's context classLoader is used to load the factory class.
+ * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+ * current {@code Thread}'s context classLoader is used to load the factory class.
*
* @return New instance of a {@code SAXParserFactory}
*
- * @throws FactoryConfigurationError if factoryClassName is null, or
+ * @throws FactoryConfigurationError if {@code factoryClassName} is {@code null}, or
* the factory class cannot be loaded, instantiated.
*
* @see #newInstance()
@@ -179,8 +178,8 @@ public abstract class SAXParserFactory {
}
/**
- *
Creates a new instance of a SAXParser using the currently - * configured factory parameters.
+ * Creates a new instance of a SAXParser using the currently + * configured factory parameters. * * @return A new instance of a SAXParser. * @@ -196,7 +195,7 @@ public abstract class SAXParserFactory { /** * Specifies that the parser produced by this code will * provide support for XML namespaces. By default the value of this is set - * tofalse.
+ * to {@code false}.
*
* @param awareness true if the parser produced by this code will
* provide support for XML namespaces; false otherwise.
@@ -209,7 +208,7 @@ public abstract class SAXParserFactory {
/**
* Specifies that the parser produced by this code will
* validate documents as they are parsed. By default the value of this is
- * set to false.
+ * set to {@code false}.
*
* * Note that "the validation" here means @@ -217,15 +216,13 @@ public abstract class SAXParserFactory { * parser as defined in the XML recommendation. * In other words, it essentially just controls the DTD validation. * (except the legacy two properties defined in JAXP 1.2.) - *
* *
* To use modern schema languages such as W3C XML Schema or
* RELAX NG instead of DTD, you can configure your parser to be
* a non-validating parser by leaving the {@link #setValidating(boolean)}
- * method false, then use the {@link #setSchema(Schema)}
+ * method {@code false}, then use the {@link #setSchema(Schema)}
* method to associate a schema to a parser.
- *
Sets the particular feature in the underlying implementation of + * Sets the particular feature in the underlying implementation of * org.xml.sax.XMLReader. * A list of the core features and properties can be found at - * http://www.saxproject.org/
+ * http://www.saxproject.org/ * *All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature. - * When the feature is
+ * When the feature is *true: the implementation will limit XML processing to conform to implementation limits.
+ * {@code true}: the implementation will limit XML processing to conform to implementation limits.
* Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources.
* If XML processing is limited for security reasons, it will be reported via a call to the registered
* {@link org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)}.
- * See {@link SAXParser} parse methods for handler specification.
+ * See {@link SAXParser} {@code parse} methods for handler specification.
* false, the implementation will processing XML according to the XML specifications without
+ * When the feature is {@code false}, the implementation will processing XML according to the XML specifications without
* regard to possible implementation limits.
* name parameter is null.
+ * @throws NullPointerException If the {@code name} parameter is null.
*
* @see org.xml.sax.XMLReader#setFeature
*/
@@ -302,8 +298,8 @@ public abstract class SAXParserFactory {
/**
*
- * Returns the particular property requested for in the underlying - * implementation of org.xml.sax.XMLReader.
+ * Returns the particular property requested for in the underlying + * implementation of org.xml.sax.XMLReader. * * @param name The name of the property to be retrieved. * @@ -347,12 +343,12 @@ public abstract class SAXParserFactory { } /** - *Set the {@link Schema} to be used by parsers created - * from this factory.
+ * Set the {@link Schema} to be used by parsers created + * from this factory. * *When a {@link Schema} is non-null, a parser will use a validator * created from it to validate documents before it passes information - * down to the application.
+ * down to the application. * *When warnings/errors/fatal errors are found by the validator, the parser must * handle them as if those errors were found by the parser itself. @@ -364,29 +360,28 @@ public abstract class SAXParserFactory { *
A validator may modify the SAX event stream (for example by * adding default values that were missing in documents), and a parser * is responsible to make sure that the application will receive - * those modified event stream.
+ * those modified event stream. * - *Initially, null is set as the {@link Schema}.
Initially, {@code null} is set as the {@link Schema}. * *
This processing will take effect even if
- * the {@link #isValidating()} method returns false.
+ * the {@link #isValidating()} method returns {@code false}.
*
*
It is an error to use
- * the http://java.sun.com/xml/jaxp/properties/schemaSource
- * property and/or the http://java.sun.com/xml/jaxp/properties/schemaLanguage
+ * the {@code http://java.sun.com/xml/jaxp/properties/schemaSource}
+ * property and/or the {@code http://java.sun.com/xml/jaxp/properties/schemaLanguage}
* property in conjunction with a non-null {@link Schema} object.
* Such configuration will cause a {@link SAXException}
- * exception when those properties are set on a {@link SAXParser}.
* A parser must be able to work with any {@link Schema} * implementation. However, parsers and schemas are allowed * to use implementation-specific custom mechanisms * as long as they yield the result described in the specification. - *
* - * @param schemaSchema to use, null to remove a schema.
+ * @param schema {@code Schema} to use, {@code null} to remove a schema.
*
* @throws UnsupportedOperationException When implementation does not
* override this method
@@ -404,16 +399,16 @@ public abstract class SAXParserFactory {
}
/**
- * Set state of XInclude processing.
+ * Set state of XInclude processing. * *If XInclude markup is found in the document instance, should it be * processed as specified in - * XML Inclusions (XInclude) Version 1.0.
+ * XML Inclusions (XInclude) Version 1.0. * - *XInclude processing defaults to false.
XInclude processing defaults to {@code false}.
*
- * @param state Set XInclude processing to true or
- * false
+ * @param state Set XInclude processing to {@code true} or
+ * {@code false}
*
* @throws UnsupportedOperationException When implementation does not
* override this method
@@ -429,7 +424,7 @@ public abstract class SAXParserFactory {
}
/**
- *
Get state of XInclude processing.
+ * Get state of XInclude processing. * * @return current state of XInclude processing * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java index fc14bc620bc..1ec4d382711 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java @@ -70,7 +70,6 @@ public abstract class XMLEventFactory { * This static method creates a new factory instance. * This method uses the following ordered lookup procedure to determine * the XMLEventFactory implementation class to load: - **
* This method uses the following ordered lookup procedure to determine * the XMLEventFactory implementation class to load: - *
*
Use the javax.xml.stream.XMLInputFactory system property. @@ -201,12 +201,11 @@ public abstract class XMLInputFactory { *
* Once an application has obtained a reference to a XMLInputFactory it * can use the factory to configure and obtain stream instances. - *
** Note that this is a new method that replaces the deprecated newInstance() method. * No changes in behavior are defined by this replacement method relative to * the deprecated method. - *
+ * * @throws FactoryConfigurationError in case of {@linkplain * java.util.ServiceConfigurationError service configuration error} or if * the implementation is not available or cannot be instantiated. @@ -245,7 +244,6 @@ public abstract class XMLInputFactory { ** This method uses the following ordered lookup procedure to determine * the XMLInputFactory implementation class to load: - *
*
@@ -488,7 +486,6 @@ public abstract class XMLInputFactory { *
* All implementations that implement JAXP 1.5 or newer are required to * support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} property. - *
*@@ -497,7 +494,7 @@ public abstract class XMLInputFactory { * due to the restriction of this property, {@link javax.xml.stream.XMLStreamException} * will be thrown by the {@link javax.xml.stream.XMLStreamReader#next()} or * {@link javax.xml.stream.XMLEventReader#nextEvent()} method. - *
+ * *The following paragraphs describe the namespace and prefix repair algorithm:
+ *The following paragraphs describe the namespace and prefix repair algorithm: * *
The property can be set with the following code line:
- * setProperty("javax.xml.stream.isRepairingNamespaces",new Boolean(true|false));
This property specifies that the writer default namespace prefix declarations. - * The default value is false.
+ * The default value is false. * *If a writer isRepairingNamespaces it will create a namespace declaration * on the current StartElement for @@ -74,11 +75,11 @@ import javax.xml.transform.Result; * has not been declared in a parent of the current StartElement it will be declared * on the current StartElement. If the defaultNamespace is bound and in scope * and the default namespace matches the URI of the attribute or StartElement - * QName no prefix will be assigned.
+ * QName no prefix will be assigned. * *If an element or attribute name has a prefix, but is not * bound to any namespace URI, then the prefix will be removed - * during serialization.
+ * during serialization. * *If element and/or attribute names in the same start or * empty-element tag are bound to different namespace URIs and @@ -86,20 +87,20 @@ import javax.xml.transform.Result; * occurring attribute retains the original prefix and the * following attributes have their prefixes replaced with a * new prefix that is bound to the namespace URIs of those - * attributes.
+ * attributes. * *If an element or attribute name uses a prefix that is * bound to a different URI than that inherited from the * namespace context of the parent of that element and there * is no namespace declaration in the context of the current - * element then such a namespace declaration is added.
+ * element then such a namespace declaration is added. * *If an element or attribute name is bound to a prefix and * there is a namespace declaration that binds that prefix * to a different URI then that namespace declaration is * either removed if the correct mapping is inherited from * the parent context of that element, or changed to the - * namespace URI of the element or attribute using that prefix.
+ * namespace URI of the element or attribute using that prefix. * * @version 1.2 * @author Copyright (c) 2009, 2015 by Oracle Corporation. All Rights Reserved. @@ -136,7 +137,6 @@ public abstract class XMLOutputFactory { * This static method creates a new factory instance. This method uses the * following ordered lookup procedure to determine the XMLOutputFactory * implementation class to load: - **
* Otherwise, the system-default implementation is returned. *
* Once an application has obtained a reference to a XMLOutputFactory it * can use the factory to configure and obtain stream instances. @@ -222,7 +223,6 @@ public abstract class XMLOutputFactory { *
* This method uses the following ordered lookup procedure to determine * the XMLOutputFactory implementation class to load: - *
*
List l = (List) getProperty("javax.xml.stream.notations");
+ * {@code List l = (List) getProperty("javax.xml.stream.notations");}
* The following call will return a list of entity declarations:
- * List l = (List) getProperty("javax.xml.stream.entities");
+ * {@code List l = (List) getProperty("javax.xml.stream.entities");}
* These properties can only be accessed during a DTD event and
* are defined to return null if the information is not available.
*
@@ -97,12 +97,13 @@ import javax.xml.namespace.QName;
* getElementText(), nextTag()
*
*
+ * Given the following XML: NOTE: empty element (such as <tag/>) will be reported
+ * NOTE: empty element (such as {@code An object that implements this interface contains the information
- * needed to build a transformation result tree. Normally, result tree serialization escapes & and < (and
+ * Normally, result tree serialization escapes{@literal & and <} (and
* possibly other characters) when outputting text nodes.
* This ensures that the output is well-formed XML. However,
* it is sometimes convenient to be able to produce output that is
@@ -46,10 +46,10 @@ public interface Result {
* the output may include ill-formed sections that will
* be transformed into well-formed XML by a subsequent non-XML aware
* process. If a processing instruction is sent with this name,
- * serialization should be output without any escaping. Result DOM trees may also have PI_DISABLE_OUTPUT_ESCAPING and
- * PI_ENABLE_OUTPUT_ESCAPING inserted into the tree. If the Result is not to be written to a file, the system identifier is optional.
* The application may still want to provide one, however, for use in error messages
- * and warnings, or to resolve relative output identifiers. A TransformerFactory instance can be used to create
* {@link javax.xml.transform.Transformer} and
- * {@link javax.xml.transform.Templates} objects. The system property that determines which Factory implementation
- * to create is named
* Obtain a new instance of a {@code TransformerFactory}.
* This static method creates a new factory instance.
*
* This method uses the following ordered lookup procedure to determine
- * the {@code TransformerFactory} implementation class to
- * load:
- *
+ * the {@code TransformerFactory} implementation class to load:
* Obtain a new instance of a {@code TransformerFactory} from factory class name.
+ * Obtain a new instance of a {@code TransformerFactory} from factory class name.
* This function is useful when there are multiple providers in the classpath.
* It gives more control to the application as it can specify which provider
- * should be loaded. Once an application has obtained a reference to a
* {@code TransformerFactory} it can use the factory to configure
- * and obtain transformer instances. Setting the Setting the {@code jaxp.debug} system property will cause
* this method to print a lot of debug messages
- * to If you have problems try: If you have problems try:
* Process the Create a new Get the stylesheet specification(s) associated with the
- * XML Set a feature for this {@code TransformerFactory} and Set a feature for this {@code TransformerFactory} and {@code Transformer}s
+ * or {@code Template}s created by this factory.
*
*
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
* An {@link TransformerConfigurationException} is thrown if this {@code TransformerFactory} or the
- * All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature.
- * When the feature is:
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
- *
* All implementations that implement JAXP 1.5 or newer are required to
* support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} and
* {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_STYLESHEET} properties.
- *
@@ -351,7 +346,7 @@ public abstract class TransformerFactory {
* If access is denied during transformation due to the restriction of this property,
* {@link javax.xml.transform.TransformerException} will be thrown by
* {@link javax.xml.transform.Transformer#transform(Source, Result)}.
- *
* Access to external DTDs in the stylesheet is restricted to the protocols
* specified by the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} property.
@@ -359,7 +354,7 @@ public abstract class TransformerFactory {
* restriction of this property,
* {@link javax.xml.transform.TransformerConfigurationException} will be thrown
* by the {@link #newTransformer(Source)} method.
- *
* Access to external reference set by the stylesheet processing instruction,
* Import and Include element is restricted to the protocols specified by the
@@ -368,14 +363,14 @@ public abstract class TransformerFactory {
* restriction of this property,
* {@link javax.xml.transform.TransformerConfigurationException} will be thrown
* by the {@link #newTransformer(Source)} method.
- *
* Access to external document through XSLT document function is restricted
* to the protocols specified by the property. If access is denied during
* the transformation due to the restriction of this property,
* {@link javax.xml.transform.TransformerException} will be thrown by the
* {@link javax.xml.transform.Transformer#transform(Source, Result)} method.
- * Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree. If no output DOM source is set, the transformation will create a Document node as the holder for the result of the transformation,
- * which may be retrieved with {@link #getNode()}. If no output DOM source is set, the transformation will create
+ * a Document node as the holder for the result of the transformation,
+ * which may be retrieved with {@link #getNode()}.
*
* @author Jeff Suttor
* @since 1.4
*/
public class DOMResult implements Result {
- /** If {@link javax.xml.transform.TransformerFactory#getFeature}
- * returns Zero-argument default constructor. {@code node},
+ * {@code siblingNode} and
+ * {@code systemId}
+ * will be set to {@code null}.
*/
public DOMResult() {
setNode(null);
@@ -60,17 +63,17 @@ public class DOMResult implements Result {
}
/**
- * Use a DOM node to create a new output target. In practice, the node should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or
* a {@link org.w3c.dom.Element} node.
- * In other words, a node that accepts children. {@code siblingNode} and
+ * {@code systemId}
+ * will be set to {@code null}.
*
* @param node The DOM node that will contain the result tree.
*/
@@ -81,15 +84,15 @@ public class DOMResult implements Result {
}
/**
- * Use a DOM node to create a new output target with the specified System ID.
+ * Use a DOM node to create a new output target with the specified System ID.
*
* In practice, the node should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or
* a {@link org.w3c.dom.Element} node.
- * In other words, a node that accepts children. {@code siblingNode} will be set to {@code null}.
*
* @param node The DOM node that will contain the result tree.
* @param systemId The system identifier which may be used in association with this node.
@@ -101,32 +104,33 @@ public class DOMResult implements Result {
}
/**
- * Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before. In practice, In practice, {@code node} and {@code nextSibling} should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or
* a {@link org.w3c.dom.Element} node.
- * In other words, a node that accepts children. Use Use {@code nextSibling} to specify the child node
* where the result nodes should be inserted before.
- * If {@code systemId} will be set to {@code null}.
*
* @param node The DOM node that will contain the result tree.
* @param nextSibling The child node where the result nodes should be inserted before.
*
- * @throws IllegalArgumentException If Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before and
- * the specified System ID. In practice, In practice, {@code node} and {@code nextSibling} should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or a
* {@link org.w3c.dom.Element} node.
- * In other words, a node that accepts children. Use Use {@code nextSibling} to specify the child node
* where the result nodes should be inserted before.
- * If Set the node that will contain the result DOM tree.
+ * Set the node that will contain the result DOM tree.
*
* In practice, the node should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or
* a {@link org.w3c.dom.Element} node.
- * In other words, a node that accepts children. An An {@code IllegalStateException} is thrown if
+ * {@code nextSibling} is not {@code null} and
+ * {@code node} is not a parent of {@code nextSibling}.
+ * An {@code IllegalStateException} is thrown if {@code node} is {@code null} and
+ * {@code nextSibling} is not {@code null}.
*
* @param node The node to which the transformation will be appended.
*
- * @throws IllegalStateException If Get the node that will contain the result DOM tree. If no node was set via
* {@link #DOMResult(Node node)},
@@ -251,7 +257,7 @@ public class DOMResult implements Result {
* {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
* {@link #setNode(Node node)},
* then the node will be set by the transformation, and may be obtained from this method once the transformation is complete.
- * Calling this method before the transformation will return Set the child node before which the result nodes will be inserted. Use Use {@code nextSibling} to specify the child node
* before which the result nodes should be inserted.
- * If Get the child node before which the result nodes will be inserted. If no node was set via
* {@link #DOMResult(Node node, Node nextSibling)},
* {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
* {@link #setNextSibling(Node nextSibling)},
- * then Set the systemId that may be used in association with the node. Get the System Identifier. If no System ID was set via
* {@link #DOMResult(Node node, String systemId)},
* {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
* {@link #setSystemId(String systemId)},
- * then The node to which the transformation will be appended. The child node before which the result nodes will be inserted. The System ID that may be used in association with the node.
- @since 1.6
-
- * <foo><!--description-->content text<![CDATA[<greeting>Hello</greeting>]]>other content</foo>
+ * {@code
* The behavior of calling next() when being on foo will be:
* 1- the comment (COMMENT)
* 2- then the characters section (CHARACTERS)
@@ -192,14 +193,14 @@ public interface XMLStreamReader extends XMLStreamConstants {
* 4- then the next characters section (another CHARACTERS)
* 5- then the END_ELEMENT
*
- *
Precondition: the current event is START_ELEMENT.
- *
Postcondition: the current event is the corresponding END_ELEMENT.
+ *
Precondition: the current event is START_ELEMENT.
+ *
Postcondition: the current event is the corresponding END_ELEMENT.
*
- *
The method does the following (implementations are free to optimized
+ *
The method does the following (implementations are free to optimized
* but must do equivalent processing):
*
* if(getEventType() != XMLStreamConstants.START_ELEMENT) {
- * throw new XMLStreamException(
- * "parser must be on START_ELEMENT to read next text", getLocation());
+ * throw new XMLStreamException(
+ * "parser must be on START_ELEMENT to read next text", getLocation());
* }
+ *
* int eventType = next();
* StringBuffer content = new StringBuffer();
- * while(eventType != XMLStreamConstants.END_ELEMENT ) {
- * if(eventType == XMLStreamConstants.CHARACTERS
- * || eventType == XMLStreamConstants.CDATA
- * || eventType == XMLStreamConstants.SPACE
- * || eventType == XMLStreamConstants.ENTITY_REFERENCE) {
- * buf.append(getText());
- * } else if(eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
- * || eventType == XMLStreamConstants.COMMENT) {
- * // skipping
- * } else if(eventType == XMLStreamConstants.END_DOCUMENT) {
- * throw new XMLStreamException(
- * "unexpected end of document when reading element text content", this);
- * } else if(eventType == XMLStreamConstants.START_ELEMENT) {
- * throw new XMLStreamException(
- * "element text content may not contain START_ELEMENT", getLocation());
- * } else {
- * throw new XMLStreamException(
- * "Unexpected event type "+eventType, getLocation());
- * }
- * eventType = next();
+ * while(eventType != XMLStreamConstants.END_ELEMENT) {
+ * if(eventType == XMLStreamConstants.CHARACTERS
+ * || eventType == XMLStreamConstants.CDATA
+ * || eventType == XMLStreamConstants.SPACE
+ * || eventType == XMLStreamConstants.ENTITY_REFERENCE) {
+ * buf.append(getText());
+ * } else if(eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
+ * || eventType == XMLStreamConstants.COMMENT) {
+ * // skipping
+ * } else if(eventType == XMLStreamConstants.END_DOCUMENT) {
+ * throw new XMLStreamException(
+ * "unexpected end of document when reading element text content", this);
+ * } else if(eventType == XMLStreamConstants.START_ELEMENT) {
+ * throw new XMLStreamException(
+ * "element text content may not contain START_ELEMENT", getLocation());
+ * } else {
+ * throw new XMLStreamException(
+ * "Unexpected event type "+eventType, getLocation());
+ * }
+ * eventType = next();
* }
* return buf.toString();
*
@@ -268,33 +270,33 @@ public interface XMLStreamReader extends XMLStreamConstants {
* are encountered, an exception is thrown. This method should
* be used when processing element-only content seperated by white space.
*
- *
Precondition: none
- *
Postcondition: the current event is START_ELEMENT or END_ELEMENT
+ *
Precondition: none
+ *
Postcondition: the current event is START_ELEMENT or END_ELEMENT
* and cursor may have moved over any whitespace event.
*
- *
Essentially it does the following (implementations are free to optimized
+ *
Essentially it does the following (implementations are free to optimized
* but must do equivalent processing):
- *
+ *
* XMLStreamException may be thrown if there are any XML errors in the underlying source.
* The "targetStart" argument must be greater than or equal to 0 and less than the length of "target",
* Length must be greater than 0 and "targetStart + length" must be less than or equal to length of "target".
@@ -564,8 +566,8 @@ public interface XMLStreamReader extends XMLStreamConstants {
* @param length the number of characters to copy
* @return the number of characters actually copied
* @throws XMLStreamException if the underlying XML source is not well-formed
- * @throws IndexOutOfBoundsException if targetStart < 0 or > than the length of target
- * @throws IndexOutOfBoundsException if length < 0 or targetStart + length > length of target
+ * @throws IndexOutOfBoundsException if targetStart {@literal <} 0 or {@literal >} than the length of target
+ * @throws IndexOutOfBoundsException if length {@literal <} 0 or targetStart + length {@literal >} length of target
* @throws UnsupportedOperationException if this method is not supported
* @throws NullPointerException is if target is null
*/
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java
index f3615892b7a..ca05fc083be 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java
@@ -33,9 +33,9 @@ import javax.xml.namespace.NamespaceContext;
/**
* The XMLStreamWriter interface specifies how to write XML. The XMLStreamWriter does
* not perform well formedness checking on its input. However
- * the writeCharacters method is required to escape & , < and >
+ * the writeCharacters method is required to escape {@literal &, < and >}
* For attribute values the writeAttribute method will escape the
- * above characters plus " to ensure that all character content
+ * above characters plus {@literal "} to ensure that all character content
* and attribute values are well formed.
*
* Each NAMESPACE
@@ -44,12 +44,12 @@ import javax.xml.namespace.NamespaceContext;
* {@code
* int eventType = next();
- * while((eventType == XMLStreamConstants.CHARACTERS && isWhiteSpace()) // skip whitespace
- * || (eventType == XMLStreamConstants.CDATA && isWhiteSpace())
+ * while((eventType == XMLStreamConstants.CHARACTERS && isWhiteSpace()) // skip whitespace
+ * || (eventType == XMLStreamConstants.CDATA && isWhiteSpace())
* // skip whitespace
* || eventType == XMLStreamConstants.SPACE
* || eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
* || eventType == XMLStreamConstants.COMMENT
* ) {
- * eventType = next();
+ * eventType = next();
* }
- * if (eventType != XMLStreamConstants.START_ELEMENT && eventType != XMLStreamConstants.END_ELEMENT) {
- * throw new String XMLStreamException("expected start or end tag", getLocation());
+ * if (eventType != XMLStreamConstants.START_ELEMENT && eventType != XMLStreamConstants.END_ELEMENT) {
+ * throw new String XMLStreamException("expected start or end tag", getLocation());
* }
- * return eventType;
+ * return eventType; }
*
*
* @return the event type of the element read (START_ELEMENT or END_ELEMENT)
* @throws XMLStreamException if the current event is not white space, PROCESSING_INSTRUCTION,
* START_ELEMENT or END_ELEMENT
- * @throws NoSuchElementException if this is called when hasNext() returns false
+ * @throws java.util.NoSuchElementException if this is called when hasNext() returns false
*/
public int nextTag() throws XMLStreamException;
@@ -309,7 +311,7 @@ public interface XMLStreamReader extends XMLStreamConstants {
public boolean hasNext() throws XMLStreamException;
/**
- * Frees any resources associated with this Reader. This method does not close the
+ * Frees any resources associated with this Reader. This method does not close the
* underlying input source.
* @throws XMLStreamException if there are errors freeing associated resources
*/
@@ -542,7 +544,7 @@ public interface XMLStreamReader extends XMLStreamConstants {
* If the number of characters actually copied is less than the "length", then there is no more text.
* Otherwise, subsequent calls need to be made until all text has been retrieved. For example:
*
- *
+ *
+ * } {@code
* int length = 1024;
* char[] myBuffer = new char[ length ];
*
@@ -553,7 +555,7 @@ public interface XMLStreamReader extends XMLStreamConstants {
* if (nCopied < length)
* break;
* }
- *
*
*
- *
* XML Namespaces,
+ * javax.xml.stream.isRepairingNamespaces and write method behaviourXML Namespaces, {@code javax.xml.stream.isRepairingNamespaces} and write method behaviour
*
*
* Method
- *
- * isRepairingNamespaces == true
+ * isRepairingNamespaces == false{@code isRepairingNamespaces} == true
+ * {@code isRepairingNamespaces} == false
*
*
*
@@ -62,7 +62,7 @@ import javax.xml.namespace.NamespaceContext;
*
*
- *
*
*
+ * writeAttribute(namespaceURI, localName, value){@code writeAttribute(namespaceURI, localName, value)}
*
*
*
@@ -79,19 +79,19 @@ import javax.xml.namespace.NamespaceContext;
*
*
*
- *
* XMLStreamException
+ * {@code XMLStreamException}
*
- *
*
*
+ * writeAttribute(prefix, namespaceURI, localName, value){@code writeAttribute(prefix, namespaceURI, localName, value)}
*
*
*
- * bound to same prefix:
*
- * prefix:localName="value" [1]
- *
- * bound to different prefix:
+ * bound to same prefix:
+ * prefix:localName="value" [1]
+ *
+ * bound to different prefix:
* xmlns:{generated}="namespaceURI" {generated}:localName="value"
*
@@ -101,11 +101,11 @@ import javax.xml.namespace.NamespaceContext;
*
*
*
- * bound to same prefix:
*
- * prefix:localName="value" [1][2]
- *
- * bound to different prefix:
- * XMLStreamException[2]
+ * bound to same prefix:
+ * prefix:localName="value" [1][2]
+ *
+ * bound to different prefix:
+ * {@code XMLStreamException}[2]
*
*
@@ -114,58 +114,58 @@ import javax.xml.namespace.NamespaceContext;
*
- *
*
*
+ * writeStartElement(namespaceURI, localName)
- *
- * writeEmptyElement(namespaceURI, localName){@code writeStartElement(namespaceURI, localName)}
*
*
+ *
+ * {@code writeEmptyElement(namespaceURI, localName)}
*
- * <prefix:localName> [1]
+ * {@code
*
*
- * <{generated}:localName xmlns:{generated}="namespaceURI">
+ * {@code <{generated}:localName xmlns:{generated}="namespaceURI">}
*
*
*
*
- * <prefix:localName> [1]
+ * {@code prefix:localName>} [1]
*
*
*
- *
* XMLStreamException
+ * {@code XMLStreamException}
*
- *
*
@@ -175,10 +175,14 @@ import javax.xml.namespace.NamespaceContext;
* Notes:
*
+ * writeStartElement(prefix, localName, namespaceURI)
- *
- * writeEmptyElement(prefix, localName, namespaceURI){@code writeStartElement(prefix, localName, namespaceURI)}
*
*
+ *
+ * {@code writeEmptyElement(prefix, localName, namespaceURI)}
*
- * bound to same prefix:
*
- * <prefix:localName> [1]
- *
- * bound to different prefix:
- * <{generated}:localName xmlns:{generated}="namespaceURI">
+ * bound to same prefix:
+ * {@code
+ *
+ * bound to different prefix:
+ * {@code <{generated}:localName xmlns:{generated}="namespaceURI">}
*
*
- * <prefix:localName xmlns:prefix="namespaceURI"> [4]
+ * {@code
*
*
*
- * bound to same prefix:
*
- * <prefix:localName> [1]
- *
- * bound to different prefix:
- * XMLStreamException
+ * bound to same prefix:
+ * {@code
+ *
+ * bound to different prefix:
+ * {@code XMLStreamException}
*
*
- * <prefix:localName>
+ * {@code
*
*
*
*
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/Result.java b/jaxp/src/java.xml/share/classes/javax/xml/transform/Result.java
index fb5a42ee923..dab8dcde123 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/Result.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/Result.java
@@ -27,7 +27,7 @@ package javax.xml.transform;
/**
* "javax.xml.transform.TransformerFactory".
+ * to create is named {@code "javax.xml.transform.TransformerFactory"}.
* This property names a concrete subclass of the
* {@code TransformerFactory} abstract class. If the property is not
- * defined, a platform default is be used.
*
- Tip for Trouble-shooting
- * jaxp.debug system property will cause
+ * System.err about what it is doing and where it is looking at.
* java -Djaxp.debug=1 YourProgram ....
*
*
* @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.transform.TransformerFactory}.
*
- * @param classLoader ClassLoader used to load the factory class. If null
- * current Thread's context classLoader is used to load the factory class.
+ * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+ * current {@code Thread}'s context classLoader is used to load the factory class.
*
* @return new TransformerFactory instance, never null.
*
* @throws TransformerFactoryConfigurationError
- * if factoryClassName is null, or
+ * if {@code factoryClassName} is {@code null}, or
* the factory class cannot be loaded, instantiated.
*
* @see #newInstance()
@@ -160,29 +157,29 @@ public abstract class TransformerFactory {
factoryClassName, classLoader, false, false);
}
/**
- * Source into a Transformer
- * Object. The Source is an XSLT document that
+ * Process the {@code Source} into a {@code Transformer}
+ * {@code Object}. The {@code Source} is an XSLT document that
* conforms to
* XSL Transformations (XSLT) Version 1.0. Care must
- * be taken not to use this Transformer in multiple
- * Threads running concurrently.
- * Different TransformerFactories can be used concurrently by
- * different Threads.Source of XSLT document used to create
- * Transformer.
- * Examples of XML Sources include
+ * @param source {@code Source } of XSLT document used to create
+ * {@code Transformer}.
+ * Examples of XML {@code Source}s include
* {@link javax.xml.transform.dom.DOMSource DOMSource},
* {@link javax.xml.transform.sax.SAXSource SAXSource}, and
* {@link javax.xml.transform.stream.StreamSource StreamSource}.
*
- * @return A Transformer object that may be used to perform
- * a transformation in a single Thread, never
- * null.
+ * @return A {@code Transformer} object that may be used to perform
+ * a transformation in a single {@code Thread}, never
+ * {@code null}.
*
* @throws TransformerConfigurationException Thrown if there are errors when
- * parsing the Source or it is not possible to create a
- * Transformer instance.
+ * parsing the {@code Source} or it is not possible to create a
+ * {@code Transformer} instance.
*
* @see
* XSL Transformations (XSLT) Version 1.0
@@ -191,15 +188,15 @@ public abstract class TransformerFactory {
throws TransformerConfigurationException;
/**
- * Transformer that performs a copy
- * of the Source to the Result.
- * i.e. the "identity transform".Transformer instance.
+ * possible to create a {@code Transformer} instance.
*/
public abstract Transformer newTransformer()
throws TransformerConfigurationException;
@@ -215,7 +212,7 @@ public abstract class TransformerFactory {
* @param source An object that holds a URL, input stream, etc.
*
* @return A Templates object capable of being used for transformation
- * purposes, never null.
+ * purposes, never {@code null}.
*
* @throws TransformerConfigurationException When parsing to
* construct the Templates object fails.
@@ -224,13 +221,13 @@ public abstract class TransformerFactory {
throws TransformerConfigurationException;
/**
- * Source document via the
+ * Get the stylesheet specification(s) associated with the
+ * XML {@code Source} document via the
*
* xml-stylesheet processing instruction that match the given criteria.
* Note that it is possible to return several stylesheets, in which case
* they are applied as if they were a list of imports or cascades in a
- * single stylesheet.Source Object suitable for passing
+ * @return A {@code Source} {@code Object} suitable for passing
* to the {@code TransformerFactory}.
*
- * @throws TransformerConfigurationException An Exception
+ * @throws TransformerConfigurationException An {@code Exception}
* is thrown if an error occurings during parsing of the
- * source.
+ * {@code source}.
*
* @see
* Associating Style Sheets with XML documents Version 1.0
@@ -275,22 +272,21 @@ public abstract class TransformerFactory {
//======= CONFIGURATION METHODS =======
/**
- * Transformers
- * or Templates created by this factory.Transformers or Templates it creates cannot support the feature.
+ * {@code Transformer}s or {@code Template}s it creates cannot support the feature.
* It is possible for an {@code TransformerFactory} to expose a feature value but be unable to change its state.
- *
*
*
* @param name Feature name.
- * @param value Is feature state true: the implementation will limit XML processing to conform to implementation limits
+ * {@code true}: the implementation will limit XML processing to conform to implementation limits
* and behave in a secure fashion as defined by the implementation.
* Examples include resolving user defined style sheets and functions.
* If XML processing is limited for security reasons, it will be reported via a call to the registered
@@ -298,17 +294,17 @@ public abstract class TransformerFactory {
* See {@link #setErrorListener(ErrorListener listener)}.
* false: the implementation will processing XML according to the XML specifications without
+ * {@code false}: the implementation will processing XML according to the XML specifications without
* regard to possible implementation limits.
* true or false.
+ * @param value Is feature state {@code true} or {@code false}.
*
* @throws TransformerConfigurationException if this {@code TransformerFactory}
- * or the Transformers or Templates it creates cannot support this feature.
- * @throws NullPointerException If the name parameter is null.
+ * or the {@code Transformer}s or {@code Template}s it creates cannot support this feature.
+ * @throws NullPointerException If the {@code name} parameter is null.
*/
public abstract void setFeature(String name, boolean value)
throws TransformerConfigurationException;
@@ -319,16 +315,15 @@ public abstract class TransformerFactory {
* false is returned if this {@code TransformerFactory} or the
- * Transformers or Templates it creates cannot support the feature.
+ * {@code false} is returned if this {@code TransformerFactory} or the
+ * {@code Transformer}s or {@code Template}s it creates cannot support the feature.
* It is possible for an {@code TransformerFactory} to expose a feature value but be unable to change its state.
- * true or false.
+ * @return The current state of the feature, {@code true} or {@code false}.
*
- * @throws NullPointerException If the name parameter is null.
+ * @throws NullPointerException If the {@code name} parameter is null.
*/
public abstract boolean getFeature(String name);
@@ -336,13 +331,13 @@ public abstract class TransformerFactory {
* Allows the user to set specific attributes on the underlying
* implementation. An attribute in this context is defined to
* be an option that the implementation provides.
- * An IllegalArgumentException is thrown if the underlying
+ * An {@code IllegalArgumentException} is thrown if the underlying
* implementation doesn't recognize the attribute.
*
*
*
@@ -390,7 +385,7 @@ public abstract class TransformerFactory {
/**
* Allows the user to retrieve specific attributes on the underlying
* implementation.
- * An IllegalArgumentException is thrown if the underlying
+ * An {@code IllegalArgumentException} is thrown if the underlying
* implementation doesn't recognize the attribute.
*
* @param name The name of the attribute.
@@ -406,13 +401,13 @@ public abstract class TransformerFactory {
* Set the error event listener for the TransformerFactory, which
* is used for the processing of transformation instructions,
* and not for the transformation itself.
- * An IllegalArgumentException is thrown if the
- * ErrorListener listener is null.
+ * An {@code IllegalArgumentException} is thrown if the
+ * {@code ErrorListener} listener is {@code null}.
*
* @param listener The new error listener.
*
- * @throws IllegalArgumentException When listener is
- * null
+ * @throws IllegalArgumentException When {@code listener} is
+ * {@code null}
*/
public abstract void setErrorListener(ErrorListener listener);
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/DOMResult.java b/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/DOMResult.java
index 67ec2418740..8c4a1b789f9 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/DOMResult.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/DOMResult.java
@@ -29,29 +29,32 @@ import javax.xml.transform.Result;
import org.w3c.dom.Node;
/**
- * true when passed this value as an argument,
- * the Transformer supports Result output of this type.node,
- * siblingNode and
- * systemId
- * will be set to null.siblingNode and
- * systemId
- * will be set to null.siblingNode will be set to null.node and nextSibling should be
+ * nextSibling to specify the child node
+ * nextSibling is not a sibling of node,
- * then an IllegalArgumentException is thrown.
- * If node is null and nextSibling is not null,
- * then an IllegalArgumentException is thrown.
- * If nextSibling is null,
+ * If {@code nextSibling} is not a sibling of {@code node},
+ * then an {@code IllegalArgumentException} is thrown.
+ * If {@code node} is {@code null} and {@code nextSibling} is not {@code null},
+ * then an {@code IllegalArgumentException} is thrown.
+ * If {@code nextSibling} is {@code null},
* then the behavior is the same as calling {@link #DOMResult(Node node)},
- * i.e. append the result nodes as the last child of the specified node.systemId will be set to null.nextSibling is not a sibling of node or
- * node is null and nextSibling
- * is not null.
+ * @throws IllegalArgumentException If {@code nextSibling} is not a sibling of {@code node} or
+ * {@code node} is {@code null} and {@code nextSibling}
+ * is not {@code null}.
*
* @since 1.5
*/
@@ -151,33 +155,35 @@ public class DOMResult implements Result {
}
/**
- * node and nextSibling should be
+ * nextSibling to specify the child node
+ * nextSibling is not a sibling of node,
- * then an IllegalArgumentException is thrown.
- * If node is null and nextSibling is not null,
- * then an IllegalArgumentException is thrown.
- * If nextSibling is null,
+ * If {@code nextSibling} is not a sibling of {@code node},
+ * then an {@code IllegalArgumentException} is thrown.
+ * If {@code node} is {@code null} and {@code nextSibling} is not {@code null},
+ * then an {@code IllegalArgumentException} is thrown.
+ * If {@code nextSibling} is {@code null},
* then the behavior is the same as calling {@link #DOMResult(Node node, String systemId)},
- * i.e. append the result nodes as the last child of the specified node and use the specified System ID.nextSibling is not a
- * sibling of node or
- * node is null and nextSibling
- * is not null.
+ * @throws IllegalArgumentException If {@code nextSibling} is not a
+ * sibling of {@code node} or
+ * {@code node} is {@code null} and {@code nextSibling}
+ * is not {@code null}.
*
* @since 1.5
*/
@@ -202,27 +208,27 @@ public class DOMResult implements Result {
}
/**
- * IllegalStateException is thrown if
- * nextSibling is not null and
- * node is not a parent of nextSibling.
- * An IllegalStateException is thrown if node is null and
- * nextSibling is not null.nextSibling is not
- * null and
- * nextSibling is not a child of node or
- * node is null and
- * nextSibling is not null.
+ * @throws IllegalStateException If {@code nextSibling} is not
+ * {@code null} and
+ * {@code nextSibling} is not a child of {@code node} or
+ * {@code node} is {@code null} and
+ * {@code nextSibling} is not {@code null}.
*/
public void setNode(Node node) {
// does the corrent parent/child relationship exist?
@@ -242,7 +248,7 @@ public class DOMResult implements Result {
}
/**
- * null.nextSibling to specify the child node
+ * nextSibling is not a descendant of node,
- * then an IllegalArgumentException is thrown.
- * If node is null and nextSibling is not null,
- * then an IllegalStateException is thrown.
- * If nextSibling is null,
+ * If {@code nextSibling} is not a descendant of {@code node},
+ * then an {@code IllegalArgumentException} is thrown.
+ * If {@code node} is {@code null} and {@code nextSibling} is not {@code null},
+ * then an {@code IllegalStateException} is thrown.
+ * If {@code nextSibling} is {@code null},
* then the behavior is the same as calling {@link #DOMResult(Node node)},
- * i.e. append the result nodes as the last child of the specified node.nextSibling is not a
- * descendant of node.
- * @throws IllegalStateException If node is null
- * and nextSibling is not null.
+ * @throws IllegalArgumentException If {@code nextSibling} is not a
+ * descendant of {@code node}.
+ * @throws IllegalStateException If {@code node} is {@code null}
+ * and {@code nextSibling} is not {@code null}.
*
* @since 1.5
*/
@@ -300,13 +306,13 @@ public class DOMResult implements Result {
}
/**
- * null will be returned.null will be returned.