From 0a727480c2f3c9cd5c671b17ccc21ef9321db835 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Fri, 28 Apr 2017 15:41:38 -0700 Subject: [PATCH 01/26] 8179460: Fix unnecessary uses of {@docRoot} in serviceability APIs Reviewed-by: mchung --- .../classes/com/sun/tools/jconsole/JConsolePlugin.java | 7 +++---- .../share/classes/com/sun/jdi/ThreadGroupReference.java | 2 +- .../classes/com/sun/management/DiagnosticCommandMBean.java | 2 +- .../share/classes/com/sun/management/package-info.java | 6 ++---- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/jdk/src/jdk.jconsole/share/classes/com/sun/tools/jconsole/JConsolePlugin.java b/jdk/src/jdk.jconsole/share/classes/com/sun/tools/jconsole/JConsolePlugin.java index 04da16e4897..3e61ea9e438 100644 --- a/jdk/src/jdk.jconsole/share/classes/com/sun/tools/jconsole/JConsolePlugin.java +++ b/jdk/src/jdk.jconsole/share/classes/com/sun/tools/jconsole/JConsolePlugin.java @@ -34,8 +34,8 @@ import javax.swing.SwingWorker; /** * A JConsole plugin class. JConsole uses the - * - * service provider mechanism to search the JConsole plugins. + * {@link java.util.ServiceLoader service provider} + * mechanism to search the JConsole plugins. * Users can provide their JConsole plugins in a jar file * containing a file named * @@ -67,8 +67,7 @@ import javax.swing.SwingWorker; * call its {@link #getTabs getTabs} method and add the returned * tabs to the JConsole window. * - * @see - * java.util.ServiceLoader + * @see java.util.ServiceLoader * * @since 1.6 */ diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ThreadGroupReference.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ThreadGroupReference.java index 9c33180ee9b..dd003fa273e 100644 --- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ThreadGroupReference.java +++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ThreadGroupReference.java @@ -92,7 +92,7 @@ public interface ThreadGroupReference extends ObjectReference { * Returns a List containing each active {@link ThreadGroupReference} in this * thread group. Only the active thread groups in this immediate thread group * (and not its subgroups) are returned. - * See java.lang.ThreadGroup + * See {@link java.lang.ThreadGroup} * for information about 'active' ThreadGroups. * @return a List of {@link ThreadGroupReference} objects mirroring the * active thread groups from this thread group in the target VM. diff --git a/jdk/src/jdk.management/share/classes/com/sun/management/DiagnosticCommandMBean.java b/jdk/src/jdk.management/share/classes/com/sun/management/DiagnosticCommandMBean.java index 1d2a85e62b2..c0cf7c5f2a8 100644 --- a/jdk/src/jdk.management/share/classes/com/sun/management/DiagnosticCommandMBean.java +++ b/jdk/src/jdk.management/share/classes/com/sun/management/DiagnosticCommandMBean.java @@ -205,7 +205,7 @@ import javax.management.DynamicMBean; * Virtual Machine is modified, the {@code DiagnosticCommandMBean} emits * a {@link javax.management.Notification} with a * {@linkplain javax.management.Notification#getType() type} of - * + * * {@code "jmx.mbean.info.changed"} and a * {@linkplain javax.management.Notification#getUserData() userData} that * is the new {@code MBeanInfo}. diff --git a/jdk/src/jdk.management/share/classes/com/sun/management/package-info.java b/jdk/src/jdk.management/share/classes/com/sun/management/package-info.java index 92b200f19b4..fd6f2d060f0 100644 --- a/jdk/src/jdk.management/share/classes/com/sun/management/package-info.java +++ b/jdk/src/jdk.management/share/classes/com/sun/management/package-info.java @@ -26,15 +26,13 @@ /** * This package contains Oracle Corporation's platform extension to * the implementation of the - * - * java.lang.management API and also defines the management + * {@link java.lang.management} API and also defines the management * interface for some other components for the platform. * *

* All platform MBeans are registered in the platform MBeanServer * which can be obtained via the - * - * java.lang.management.ManagementFactory.getPlatformMBeanServer + * {@link java.lang.management.ManagementFactory#getPlatformMBeanServer} * * @author Mandy Chung * @since 1.5 From 30c35f5e348cd59a1c4f610ec8e86d20cb78aebf Mon Sep 17 00:00:00 2001 From: Ron Pressler Date: Tue, 9 May 2017 15:04:46 -0700 Subject: [PATCH 02/26] 8177153: LambdaMetafactory has default constructor Reviewed-by: psandoz --- .../share/classes/java/lang/invoke/LambdaMetafactory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java index b09744cba7d..5f56dd6ab43 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java @@ -213,7 +213,9 @@ import java.util.Arrays; * methods. * @since 1.8 */ -public class LambdaMetafactory { +public final class LambdaMetafactory { + + private LambdaMetafactory() {} /** Flag for alternate metafactories indicating the lambda object * must be serializable */ From e52af5f5b3eb4149b9e88ccd382f3981162305f8 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Wed, 10 May 2017 09:02:43 +0200 Subject: [PATCH 03/26] 8178278: Move Standard Algorithm Names document to specs directory Reviewed-by: erikj, wetmore, mullan --- .../security/AlgorithmParameterGenerator.java | 16 ++++----- .../java/security/AlgorithmParameters.java | 18 +++++----- .../classes/java/security/DrbgParameters.java | 4 +-- .../classes/java/security/KeyFactory.java | 18 +++++----- .../java/security/KeyPairGenerator.java | 26 +++++++------- .../share/classes/java/security/KeyStore.java | 23 ++++++------- .../classes/java/security/MessageDigest.java | 26 +++++++------- .../share/classes/java/security/Policy.java | 14 ++++---- .../classes/java/security/SecureRandom.java | 34 +++++++++---------- .../java/security/SecureRandomSpi.java | 4 +-- .../share/classes/java/security/Security.java | 14 ++++---- .../classes/java/security/Signature.java | 22 ++++++------ .../classes/java/security/cert/CertPath.java | 6 ++-- .../java/security/cert/CertPathBuilder.java | 18 +++++----- .../java/security/cert/CertPathValidator.java | 22 ++++++------ .../classes/java/security/cert/CertStore.java | 18 +++++----- .../java/security/cert/Certificate.java | 6 ++-- .../security/cert/CertificateFactory.java | 28 +++++++-------- .../security/cert/CertificateFactorySpi.java | 6 ++-- .../java/security/cert/package-info.java | 9 +++-- .../classes/java/security/package-info.java | 9 +++-- .../java/security/spec/EncodedKeySpec.java | 6 ++-- .../security/spec/PKCS8EncodedKeySpec.java | 6 ++-- .../security/spec/X509EncodedKeySpec.java | 6 ++-- .../share/classes/javax/crypto/Cipher.java | 18 +++++----- .../javax/crypto/ExemptionMechanism.java | 14 ++++---- .../classes/javax/crypto/KeyAgreement.java | 18 +++++----- .../classes/javax/crypto/KeyGenerator.java | 18 +++++----- .../share/classes/javax/crypto/Mac.java | 18 +++++----- .../javax/crypto/SecretKeyFactory.java | 18 +++++----- .../classes/javax/crypto/package-info.java | 8 ++--- .../classes/javax/net/ssl/SSLContext.java | 21 +++++------- .../classes/javax/net/ssl/SSLEngine.java | 8 ++--- .../classes/javax/net/ssl/SSLParameters.java | 11 +++--- .../javax/net/ssl/SSLServerSocket.java | 8 ++--- .../javax/net/ssl/SSLServerSocketFactory.java | 6 ++-- .../classes/javax/net/ssl/SSLSocket.java | 8 ++--- .../javax/net/ssl/SSLSocketFactory.java | 6 ++-- .../javax/net/ssl/TrustManagerFactory.java | 6 ++-- .../classes/javax/net/ssl/package-info.java | 8 ++--- .../security/auth/login/Configuration.java | 24 ++++++------- .../security/auth/login/package-info.java | 9 +++-- .../jdk/security/jarsigner/JarSigner.java | 10 +++--- 43 files changed, 294 insertions(+), 302 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java index 7d1134493ce..8694b603c07 100644 --- a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java +++ b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java @@ -75,9 +75,9 @@ import java.util.Objects; *

  • {@code DSA} (1024, 2048)
  • * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#algorithmparametergenerator-algorithms"> * AlgorithmParameterGenerator section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -150,8 +150,8 @@ public class AlgorithmParameterGenerator { * @param algorithm the name of the algorithm this * parameter generator is associated with. * See the AlgorithmParameterGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#algorithmparametergenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code AlgorithmParameterGenerator} object @@ -195,8 +195,8 @@ public class AlgorithmParameterGenerator { * @param algorithm the name of the algorithm this * parameter generator is associated with. * See the AlgorithmParameterGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#algorithmparametergenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the string name of the Provider. @@ -245,8 +245,8 @@ public class AlgorithmParameterGenerator { * @param algorithm the string name of the algorithm this * parameter generator is associated with. * See the AlgorithmParameterGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#algorithmparametergenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the {@code Provider} object. diff --git a/jdk/src/java.base/share/classes/java/security/AlgorithmParameters.java b/jdk/src/java.base/share/classes/java/security/AlgorithmParameters.java index e03361233a5..a5ed953e65b 100644 --- a/jdk/src/java.base/share/classes/java/security/AlgorithmParameters.java +++ b/jdk/src/java.base/share/classes/java/security/AlgorithmParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -57,9 +57,9 @@ import java.util.Objects; *
  • {@code DSA}
  • * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms"> * AlgorithmParameters section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -137,8 +137,8 @@ public class AlgorithmParameters { * * @param algorithm the name of the algorithm requested. * See the AlgorithmParameters section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new parameter object @@ -182,8 +182,8 @@ public class AlgorithmParameters { * * @param algorithm the name of the algorithm requested. * See the AlgorithmParameters section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -232,8 +232,8 @@ public class AlgorithmParameters { * * @param algorithm the name of the algorithm requested. * See the AlgorithmParameters section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. diff --git a/jdk/src/java.base/share/classes/java/security/DrbgParameters.java b/jdk/src/java.base/share/classes/java/security/DrbgParameters.java index b17cf07ace8..4767861e3ad 100644 --- a/jdk/src/java.base/share/classes/java/security/DrbgParameters.java +++ b/jdk/src/java.base/share/classes/java/security/DrbgParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, 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 @@ -188,7 +188,7 @@ import java.util.Objects; * @implSpec * By convention, a provider should name its primary DRBG implementation * with the + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> * standard {@code SecureRandom} algorithm name "DRBG". * * @implNote diff --git a/jdk/src/java.base/share/classes/java/security/KeyFactory.java b/jdk/src/java.base/share/classes/java/security/KeyFactory.java index 4d297157ebc..8171cb1b568 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyFactory.java +++ b/jdk/src/java.base/share/classes/java/security/KeyFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -75,9 +75,9 @@ import sun.security.jca.GetInstance.Instance; *
  • {@code RSA}
  • * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> * KeyFactory section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -163,8 +163,8 @@ public class KeyFactory { * * @param algorithm the name of the requested key algorithm. * See the KeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code KeyFactory} object @@ -197,8 +197,8 @@ public class KeyFactory { * * @param algorithm the name of the requested key algorithm. * See the KeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -239,8 +239,8 @@ public class KeyFactory { * * @param algorithm the name of the requested key algorithm. * See the KeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java b/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java index 10d2f067f83..b2f87720e80 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java +++ b/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -114,9 +114,9 @@ import sun.security.util.Debug; *
  • {@code RSA} (1024, 2048, 4096)
  • * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms"> * KeyPairGenerator section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -142,8 +142,8 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { * * @param algorithm the standard string name of the algorithm. * See the KeyPairGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. */ protected KeyPairGenerator(String algorithm) { @@ -153,8 +153,8 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { /** * Returns the standard name of the algorithm for this key pair generator. * See the KeyPairGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the standard string name of the algorithm. @@ -205,8 +205,8 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { * * @param algorithm the standard string name of the algorithm. * See the KeyPairGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code KeyPairGenerator} object @@ -264,8 +264,8 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { * * @param algorithm the standard string name of the algorithm. * See the KeyPairGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the string name of the provider. @@ -306,8 +306,8 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { * * @param algorithm the standard string name of the algorithm. * See the KeyPairGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/java/security/KeyStore.java b/jdk/src/java.base/share/classes/java/security/KeyStore.java index f963cae1390..fec312740f4 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyStore.java +++ b/jdk/src/java.base/share/classes/java/security/KeyStore.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -176,9 +176,9 @@ import sun.security.util.Debug; *
  • {@code PKCS12}
  • * * This type is described in the + * "{@docRoot}/../specs/security/standard-names.html#keystore-types"> * KeyStore section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other types are supported. * @@ -291,9 +291,8 @@ public class KeyStore { * @param protectionAlgorithm the encryption algorithm name, for * example, {@code PBEWithHmacSHA256AndAES_256}. * See the Cipher section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation + * "{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names"> + * Java Security Standard Algorithm Names Specification * for information about standard encryption algorithm names. * @param protectionParameters the encryption algorithm parameter * specification, which may be {@code null} @@ -854,8 +853,8 @@ public class KeyStore { * * @param type the type of keystore. * See the KeyStore section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keystore-types"> + * Java Security Standard Algorithm Names Specification * for information about standard keystore types. * * @return a keystore object of the specified type @@ -895,8 +894,8 @@ public class KeyStore { * * @param type the type of keystore. * See the KeyStore section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keystore-types"> + * Java Security Standard Algorithm Names Specification * for information about standard keystore types. * * @param provider the name of the provider. @@ -941,8 +940,8 @@ public class KeyStore { * * @param type the type of keystore. * See the KeyStore section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keystore-types"> + * Java Security Standard Algorithm Names Specification * for information about standard keystore types. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/java/security/MessageDigest.java b/jdk/src/java.base/share/classes/java/security/MessageDigest.java index 692dce5a10f..14eb6d6e7fe 100644 --- a/jdk/src/java.base/share/classes/java/security/MessageDigest.java +++ b/jdk/src/java.base/share/classes/java/security/MessageDigest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -89,9 +89,9 @@ import javax.crypto.SecretKey; *
  • {@code SHA-256}
  • * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> * MessageDigest section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -123,8 +123,8 @@ public abstract class MessageDigest extends MessageDigestSpi { * * @param algorithm the standard name of the digest algorithm. * See the MessageDigest section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. */ protected MessageDigest(String algorithm) { @@ -154,8 +154,8 @@ public abstract class MessageDigest extends MessageDigestSpi { * * @param algorithm the name of the algorithm requested. * See the MessageDigest section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return a {@code MessageDigest} object that implements the @@ -209,8 +209,8 @@ public abstract class MessageDigest extends MessageDigestSpi { * * @param algorithm the name of the algorithm requested. * See the MessageDigest section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -262,8 +262,8 @@ public abstract class MessageDigest extends MessageDigestSpi { * * @param algorithm the name of the algorithm requested. * See the MessageDigest section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. @@ -497,8 +497,8 @@ public abstract class MessageDigest extends MessageDigestSpi { * implementation details. The name should be a standard * Java Security name (such as "SHA", "MD5", and so on). * See the MessageDigest section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the name of the algorithm diff --git a/jdk/src/java.base/share/classes/java/security/Policy.java b/jdk/src/java.base/share/classes/java/security/Policy.java index 73737ddb525..bad4f522367 100644 --- a/jdk/src/java.base/share/classes/java/security/Policy.java +++ b/jdk/src/java.base/share/classes/java/security/Policy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -365,8 +365,8 @@ public abstract class Policy { * * @param type the specified Policy type. See the Policy section in the * - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#policy-types"> + * Java Security Standard Algorithm Names Specification * for a list of standard Policy types. * * @param params parameters for the Policy, which may be null. @@ -419,8 +419,8 @@ public abstract class Policy { * * @param type the specified Policy type. See the Policy section in the * - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#policy-types"> + * Java Security Standard Algorithm Names Specification * for a list of standard Policy types. * * @param params parameters for the Policy, which may be null. @@ -485,8 +485,8 @@ public abstract class Policy { * * @param type the specified Policy type. See the Policy section in the * - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#policy-types"> + * Java Security Standard Algorithm Names Specification * for a list of standard Policy types. * * @param params parameters for the Policy, which may be null. diff --git a/jdk/src/java.base/share/classes/java/security/SecureRandom.java b/jdk/src/java.base/share/classes/java/security/SecureRandom.java index 4f9f1b3a460..ae1f04f2896 100644 --- a/jdk/src/java.base/share/classes/java/security/SecureRandom.java +++ b/jdk/src/java.base/share/classes/java/security/SecureRandom.java @@ -126,7 +126,7 @@ import sun.security.util.Debug; * @implSpec * A {@code SecureRandom} service provider can advertise that it is thread-safe * by setting the service + * "{@docRoot}/../specs/security/standard-names.html#service-attributes">service * provider attribute "ThreadSafe" to "true" when registering the provider. * Otherwise, this class will instead synchronize access to the following * methods of the {@code SecureRandomSpi} implementation: @@ -203,8 +203,8 @@ public class SecureRandom extends java.util.Random { * the {@link Security#getProviders() Security.getProviders()} method. * *

    See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. */ public SecureRandom() { @@ -244,8 +244,8 @@ public class SecureRandom extends java.util.Random { * the {@link Security#getProviders() Security.getProviders()} method. * *

    See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @param seed the seed. @@ -341,8 +341,8 @@ public class SecureRandom extends java.util.Random { * * @param algorithm the name of the RNG algorithm. * See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @return the new {@code SecureRandom} object @@ -380,8 +380,8 @@ public class SecureRandom extends java.util.Random { * * @param algorithm the name of the RNG algorithm. * See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @param provider the name of the provider. @@ -424,8 +424,8 @@ public class SecureRandom extends java.util.Random { * * @param algorithm the name of the RNG algorithm. * See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @param provider the provider. @@ -478,8 +478,8 @@ public class SecureRandom extends java.util.Random { * * @param algorithm the name of the RNG algorithm. * See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @param params the {@code SecureRandomParameters} @@ -528,8 +528,8 @@ public class SecureRandom extends java.util.Random { * * @param algorithm the name of the RNG algorithm. * See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @param params the {@code SecureRandomParameters} @@ -581,8 +581,8 @@ public class SecureRandom extends java.util.Random { * * @param algorithm the name of the RNG algorithm. * See the {@code SecureRandom} section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard RNG algorithm names. * * @param params the {@code SecureRandomParameters} diff --git a/jdk/src/java.base/share/classes/java/security/SecureRandomSpi.java b/jdk/src/java.base/share/classes/java/security/SecureRandomSpi.java index fefbe576a02..8443baf68ee 100644 --- a/jdk/src/java.base/share/classes/java/security/SecureRandomSpi.java +++ b/jdk/src/java.base/share/classes/java/security/SecureRandomSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, 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 @@ -65,7 +65,7 @@ package java.security; * will synchronize access to each of the applicable engine methods * (see {@link SecureRandom} for the list of methods). However, if a * {@code SecureRandomSpi} implementation is thread-safe, the + * "{@docRoot}/../specs/security/standard-names.html#service-attributes"> * service provider attribute "ThreadSafe" should be set to "true" during * its registration, as follows: *

    diff --git a/jdk/src/java.base/share/classes/java/security/Security.java b/jdk/src/java.base/share/classes/java/security/Security.java
    index 1076b1d7da7..6c341abc92d 100644
    --- a/jdk/src/java.base/share/classes/java/security/Security.java
    +++ b/jdk/src/java.base/share/classes/java/security/Security.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1996, 2017, 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
    @@ -281,8 +281,8 @@ public final class Security {
         /**
          * Gets a specified property for an algorithm. The algorithm name
          * should be a standard name. See the 
    -     * Java Cryptography Architecture Standard Algorithm Name Documentation
    +     * "{@docRoot}/../specs/security/standard-names.html">
    +     * Java Security Standard Algorithm Names Specification
          * for information about standard algorithm names.
          *
          * One possible use is by specialized algorithm parsers, which may map
    @@ -511,8 +511,8 @@ public final class Security {
          * 
          *
          * 

    See the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html"> + * Java Security Standard Algorithm Names Specification * for information about standard cryptographic service names, standard * algorithm names and standard attribute names. * @@ -582,8 +582,8 @@ public final class Security { * * *

    See the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html"> + * Java Security Standard Algorithm Names Specification * for information about standard cryptographic service names, standard * algorithm names and standard attribute names. * diff --git a/jdk/src/java.base/share/classes/java/security/Signature.java b/jdk/src/java.base/share/classes/java/security/Signature.java index df5350e99f1..fd5dfad650a 100644 --- a/jdk/src/java.base/share/classes/java/security/Signature.java +++ b/jdk/src/java.base/share/classes/java/security/Signature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2017, 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 @@ -106,9 +106,9 @@ import sun.security.jca.GetInstance.Instance; *

  • {@code SHA256withRSA}
  • * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms"> * Signature section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -164,8 +164,8 @@ public abstract class Signature extends SignatureSpi { * * @param algorithm the standard string name of the algorithm. * See the Signature section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. */ protected Signature(String algorithm) { @@ -209,8 +209,8 @@ public abstract class Signature extends SignatureSpi { * * @param algorithm the standard name of the algorithm requested. * See the Signature section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code Signature} object @@ -332,8 +332,8 @@ public abstract class Signature extends SignatureSpi { * * @param algorithm the name of the algorithm requested. * See the Signature section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -385,8 +385,8 @@ public abstract class Signature extends SignatureSpi { * * @param algorithm the name of the algorithm requested. * See the Signature section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertPath.java b/jdk/src/java.base/share/classes/java/security/cert/CertPath.java index 88df135f6c0..295c5aa8804 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertPath.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertPath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -91,9 +91,9 @@ import java.util.List; *
  • {@code PkiPath}
  • * * These encodings are described in the + * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings"> * CertPath Encodings section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other encodings are supported. *

    diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java b/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java index 12f608816be..46d5c77580c 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -72,9 +72,9 @@ import sun.security.jca.GetInstance.Instance; *

  • {@code PKIX}
  • * * This algorithm is described in the + * "{@docRoot}/../specs/security/standard-names.html#certpathbuilder-algorithms"> * CertPathBuilder section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -152,8 +152,8 @@ public class CertPathBuilder { * * @param algorithm the name of the requested {@code CertPathBuilder} * algorithm. See the CertPathBuilder section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpathbuilder-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return a {@code CertPathBuilder} object that implements the @@ -190,8 +190,8 @@ public class CertPathBuilder { * * @param algorithm the name of the requested {@code CertPathBuilder} * algorithm. See the CertPathBuilder section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpathbuilder-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -233,8 +233,8 @@ public class CertPathBuilder { * * @param algorithm the name of the requested {@code CertPathBuilder} * algorithm. See the CertPathBuilder section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpathbuilder-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java b/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java index 298923d84a2..57efedd3348 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,9 +74,9 @@ import sun.security.jca.GetInstance.Instance; *
  • {@code PKIX}
  • * * This algorithm is described in the + * "{@docRoot}/../specs/security/standard-names.html#certpathvalidator-algorithms"> * CertPathValidator section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -152,9 +152,9 @@ public class CertPathValidator { * {@link Security#getProviders() Security.getProviders()}. * * @param algorithm the name of the requested {@code CertPathValidator} - * algorithm. See the CertPathValidator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * algorithm. See the CertPathValidator section in the + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return a {@code CertPathValidator} object that implements the @@ -190,9 +190,9 @@ public class CertPathValidator { * the {@link Security#getProviders() Security.getProviders()} method. * * @param algorithm the name of the requested {@code CertPathValidator} - * algorithm. See the CertPathValidator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * algorithm. See the CertPathValidator section in the + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -235,8 +235,8 @@ public class CertPathValidator { * * @param algorithm the name of the requested {@code CertPathValidator} * algorithm. See the CertPathValidator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpathvalidator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertStore.java b/jdk/src/java.base/share/classes/java/security/cert/CertStore.java index e62d39f27b0..0d7675c13af 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertStore.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertStore.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -67,9 +67,9 @@ import sun.security.jca.GetInstance.Instance; *
  • {@code Collection}
  • * * This type is described in the + * "{@docRoot}/../specs/security/standard-names.html#certstore-types"> * CertStore section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other types are supported. * @@ -212,8 +212,8 @@ public class CertStore { * * @param type the name of the requested {@code CertStore} type. * See the CertStore section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certstore-types"> + * Java Security Standard Algorithm Names Specification * for information about standard types. * * @param params the initialization parameters (may be {@code null}). @@ -276,8 +276,8 @@ public class CertStore { * * @param type the requested {@code CertStore} type. * See the CertStore section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certstore-types"> + * Java Security Standard Algorithm Names Specification * for information about standard types. * * @param params the initialization parameters (may be {@code null}). @@ -337,8 +337,8 @@ public class CertStore { * * @param type the requested {@code CertStore} type. * See the CertStore section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certstore-types"> + * Java Security Standard Algorithm Names Specification * for information about standard types. * * @param params the initialization parameters (may be {@code null}). diff --git a/jdk/src/java.base/share/classes/java/security/cert/Certificate.java b/jdk/src/java.base/share/classes/java/security/cert/Certificate.java index 6923627ce7b..32662ceea15 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/Certificate.java +++ b/jdk/src/java.base/share/classes/java/security/cert/Certificate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,8 +74,8 @@ public abstract class Certificate implements java.io.Serializable { * * @param type the standard name of the certificate type. * See the CertificateFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types"> + * Java Security Standard Algorithm Names Specification * for information about standard certificate types. */ protected Certificate(String type) { diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateFactory.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateFactory.java index e63c3b403d4..ae4e8bd05c4 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertificateFactory.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, 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 @@ -101,11 +101,11 @@ import sun.security.jca.GetInstance.Instance; *
  • {@code PkiPath}
  • * * The type and encodings are described in the + * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types"> * CertificateFactory section and the + * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings"> * CertPath Encodings section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other types or encodings are supported. * @@ -172,8 +172,8 @@ public class CertificateFactory { * * @param type the name of the requested certificate type. * See the CertificateFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types"> + * Java Security Standard Algorithm Names Specification * for information about standard certificate types. * * @return a certificate factory object for the specified type @@ -213,8 +213,8 @@ public class CertificateFactory { * * @param type the certificate type. * See the CertificateFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types"> + * Java Security Standard Algorithm Names Specification * for information about standard certificate types. * * @param provider the name of the provider. @@ -260,8 +260,8 @@ public class CertificateFactory { * * @param type the certificate type. * See the CertificateFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types"> + * Java Security Standard Algorithm Names Specification * for information about standard certificate types. * @param provider the provider. * @@ -359,8 +359,8 @@ public class CertificateFactory { * Returns an iteration of the {@code CertPath} encodings supported * by this certificate factory, with the default encoding first. See * the CertPath Encodings section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings"> + * Java Security Standard Algorithm Names Specification * for information about standard encoding names and their formats. *

    * Attempts to modify the returned {@code Iterator} via its @@ -399,8 +399,8 @@ public class CertificateFactory { * the data read from the {@code InputStream} inStream. The data * is assumed to be in the specified encoding. See * the CertPath Encodings section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings"> + * Java Security Standard Algorithm Names Specification * for information about standard encoding names and their formats. * * @param inStream an {@code InputStream} containing the data diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java index 35aee847bb8..0b1bb337b3f 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java +++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, 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 @@ -183,8 +183,8 @@ public abstract class CertificateFactorySpi { * Returns an iteration of the {@code CertPath} encodings supported * by this certificate factory, with the default encoding first. See * the CertPath Encodings section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings"> + * Java Security Standard Algorithm Names Specification * for information about standard encoding names. *

    * Attempts to modify the returned {@code Iterator} via its diff --git a/jdk/src/java.base/share/classes/java/security/cert/package-info.java b/jdk/src/java.base/share/classes/java/security/cert/package-info.java index 58f5fb77e0a..50b0f2c9672 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/package-info.java +++ b/jdk/src/java.base/share/classes/java/security/cert/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, 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 @@ -39,10 +39,9 @@ * Certificate Revocation List (CRL) Profile *

  • RFC 2560: X.509 Internet Public Key Infrastructure Online Certificate * Status Protocol - OCSP - *
  • - * Java™ - * Cryptography Architecture Standard Algorithm Name - * Documentation
  • + *
  • + * Java™ Security Standard Algorithm Names Specification + *
  • * * *

    Related Documentation

    diff --git a/jdk/src/java.base/share/classes/java/security/package-info.java b/jdk/src/java.base/share/classes/java/security/package-info.java index 2c8205b09b9..edb91899da8 100644 --- a/jdk/src/java.base/share/classes/java/security/package-info.java +++ b/jdk/src/java.base/share/classes/java/security/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, 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 @@ -53,10 +53,9 @@ *
  • PKCS #8: Private-Key Information Syntax Standard, Version 1.2, * November 1993
  • * - *
  • - * Java™ - * Cryptography Architecture Standard Algorithm Name - * Documentation
  • + *
  • + * Java™ Security Standard Algorithm Names Specification + *
  • * * *

    Related Documentation

    diff --git a/jdk/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java index 5aca225d2b2..99b5a04655a 100644 --- a/jdk/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java +++ b/jdk/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -67,8 +67,8 @@ public abstract class EncodedKeySpec implements KeySpec { * array are copied to protect against subsequent modification. * @param algorithm the algorithm name of the encoded key * See the KeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * @throws NullPointerException if {@code encodedKey} * or {@code algorithm} is null. diff --git a/jdk/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java index 198ca604b8c..73d79a41321 100644 --- a/jdk/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java +++ b/jdk/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -85,8 +85,8 @@ public class PKCS8EncodedKeySpec extends EncodedKeySpec { * the array are copied to protect against subsequent modification. * @param algorithm the algorithm name of the encoded private key * See the KeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * @throws NullPointerException if {@code encodedKey} * or {@code algorithm} is null. diff --git a/jdk/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java index 2d23570fe3d..7de4a2a1417 100644 --- a/jdk/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java +++ b/jdk/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -75,8 +75,8 @@ public class X509EncodedKeySpec extends EncodedKeySpec { * array are copied to protect against subsequent modification. * @param algorithm the algorithm name of the encoded public key * See the KeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * @throws NullPointerException if {@code encodedKey} * or {@code algorithm} is null. diff --git a/jdk/src/java.base/share/classes/javax/crypto/Cipher.java b/jdk/src/java.base/share/classes/javax/crypto/Cipher.java index 48ca2b01994..cf288f5f1da 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/Cipher.java +++ b/jdk/src/java.base/share/classes/javax/crypto/Cipher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -150,9 +150,9 @@ import sun.security.jca.*; *
  • {@code RSA/ECB/OAEPWithSHA-256AndMGF1Padding} (1024, 2048)
  • * * These transformations are described in the - * + * * Cipher section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other transformations are supported. * @@ -489,8 +489,8 @@ public class Cipher { * @param transformation the name of the transformation, e.g., * DES/CBC/PKCS5Padding. * See the Cipher section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names"> + * Java Security Standard Algorithm Names Specification * for information about standard transformation names. * * @return a cipher that implements the requested transformation @@ -567,8 +567,8 @@ public class Cipher { * @param transformation the name of the transformation, * e.g., DES/CBC/PKCS5Padding. * See the Cipher section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names"> + * Java Security Standard Algorithm Names Specification * for information about standard transformation names. * * @param provider the name of the provider. @@ -627,8 +627,8 @@ public class Cipher { * @param transformation the name of the transformation, * e.g., DES/CBC/PKCS5Padding. * See the Cipher section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names"> + * Java Security Standard Algorithm Names Specification * for information about standard transformation names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/javax/crypto/ExemptionMechanism.java b/jdk/src/java.base/share/classes/javax/crypto/ExemptionMechanism.java index cf19807f2dc..35e4fdfca43 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/ExemptionMechanism.java +++ b/jdk/src/java.base/share/classes/javax/crypto/ExemptionMechanism.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, 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 @@ -125,8 +125,8 @@ public class ExemptionMechanism { * mechanism. * See the ExemptionMechanism section in the * - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#exemption-mechanisms"> + * Java Security Standard Algorithm Names Specification * for information about standard exemption mechanism names. * * @return the new {@code ExemptionMechanism} object @@ -164,8 +164,8 @@ public class ExemptionMechanism { * @param algorithm the standard name of the requested exemption mechanism. * See the ExemptionMechanism section in the * - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#exemption-mechanisms"> + * Java Security Standard Algorithm Names Specification * for information about standard exemption mechanism names. * * @param provider the name of the provider. @@ -208,8 +208,8 @@ public class ExemptionMechanism { * @param algorithm the standard name of the requested exemption mechanism. * See the ExemptionMechanism section in the * - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#exemption-mechanisms"> + * Java Security Standard Algorithm Names Specification * for information about standard exemption mechanism names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/javax/crypto/KeyAgreement.java b/jdk/src/java.base/share/classes/javax/crypto/KeyAgreement.java index 47449b3338c..3f77eddccc8 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/KeyAgreement.java +++ b/jdk/src/java.base/share/classes/javax/crypto/KeyAgreement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -60,9 +60,9 @@ import sun.security.jca.GetInstance.Instance; *
  • {@code DiffieHellman}
  • * * This algorithm is described in the + * "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms"> * KeyAgreement section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -161,8 +161,8 @@ public class KeyAgreement { * @param algorithm the standard name of the requested key agreement * algorithm. * See the KeyAgreement section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code KeyAgreement} object @@ -208,8 +208,8 @@ public class KeyAgreement { * @param algorithm the standard name of the requested key agreement * algorithm. * See the KeyAgreement section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -252,8 +252,8 @@ public class KeyAgreement { * @param algorithm the standard name of the requested key agreement * algorithm. * See the KeyAgreement section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java b/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java index 4cb8b79be23..135f0ce33df 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java +++ b/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -95,9 +95,9 @@ import sun.security.util.Debug; *
  • {@code HmacSHA256}
  • * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#keygenerator-algorithms"> * KeyGenerator section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -216,8 +216,8 @@ public class KeyGenerator { * * @param algorithm the standard name of the requested key algorithm. * See the KeyGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keygenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code KeyGenerator} object @@ -250,8 +250,8 @@ public class KeyGenerator { * * @param algorithm the standard name of the requested key algorithm. * See the KeyGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keygenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -293,8 +293,8 @@ public class KeyGenerator { * * @param algorithm the standard name of the requested key algorithm. * See the KeyGenerator section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#keygenerator-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/javax/crypto/Mac.java b/jdk/src/java.base/share/classes/javax/crypto/Mac.java index 5a1d12de4c6..245f12f6934 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/Mac.java +++ b/jdk/src/java.base/share/classes/javax/crypto/Mac.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -61,9 +61,9 @@ import sun.security.jca.GetInstance.Instance; *
  • {@code HmacSHA256}
  • * * These algorithms are described in the - * + * * Mac section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -162,8 +162,8 @@ public class Mac implements Cloneable { * * @param algorithm the standard name of the requested MAC algorithm. * See the Mac section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#mac-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code Mac} object @@ -206,8 +206,8 @@ public class Mac implements Cloneable { * * @param algorithm the standard name of the requested MAC algorithm. * See the Mac section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#mac-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -247,8 +247,8 @@ public class Mac implements Cloneable { * * @param algorithm the standard name of the requested MAC algorithm. * See the Mac section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#mac-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/javax/crypto/SecretKeyFactory.java b/jdk/src/java.base/share/classes/javax/crypto/SecretKeyFactory.java index cadf2302d20..9e4bae382c6 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/SecretKeyFactory.java +++ b/jdk/src/java.base/share/classes/javax/crypto/SecretKeyFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -65,9 +65,9 @@ import sun.security.jca.GetInstance.Instance; *
  • {@code DESede}
  • * * These algorithms are described in the + * "{@docRoot}/../specs/security/standard-names.html#secretkeyfactory-algorithms"> * SecretKeyFactory section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -148,8 +148,8 @@ public class SecretKeyFactory { * @param algorithm the standard name of the requested secret-key * algorithm. * See the SecretKeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#secretkeyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @return the new {@code SecretKeyFactory} object @@ -183,8 +183,8 @@ public class SecretKeyFactory { * @param algorithm the standard name of the requested secret-key * algorithm. * See the SecretKeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#secretkeyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the name of the provider. @@ -227,8 +227,8 @@ public class SecretKeyFactory { * @param algorithm the standard name of the requested secret-key * algorithm. * See the SecretKeyFactory section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#secretkeyfactory-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard algorithm names. * * @param provider the provider. diff --git a/jdk/src/java.base/share/classes/javax/crypto/package-info.java b/jdk/src/java.base/share/classes/javax/crypto/package-info.java index 754b5f643c8..184676fa470 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/package-info.java +++ b/jdk/src/java.base/share/classes/javax/crypto/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, 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 @@ -42,9 +42,9 @@ * having to add or rewrite code. * * * *

    Related Documentation

    diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java index 2f2a0928a15..a649bdd10a0 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,9 +45,9 @@ import sun.security.jca.GetInstance; *
  • {@code TLSv1.2}
  • * * These protocols are described in the + * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms"> * SSLContext section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * @@ -147,9 +147,8 @@ public class SSLContext { * * @param protocol the standard name of the requested protocol. * See the SSLContext section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation + * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard protocol names. * * @return the new {@code SSLContext} object @@ -185,9 +184,8 @@ public class SSLContext { * * @param protocol the standard name of the requested protocol. * See the SSLContext section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation + * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard protocol names. * * @param provider the name of the provider. @@ -228,9 +226,8 @@ public class SSLContext { * * @param protocol the standard name of the requested protocol. * See the SSLContext section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation + * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms"> + * Java Security Standard Algorithm Names Specification * for information about standard protocol names. * * @param provider an instance of the provider. diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java index 9613661afc2..b765128cd85 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, 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 @@ -866,7 +866,7 @@ public abstract class SSLEngine { *

    * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -892,7 +892,7 @@ public abstract class SSLEngine { *

    * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -914,7 +914,7 @@ public abstract class SSLEngine { *

    * Note that the standard list of cipher suite names may be found in the * + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation. Providers * may support cipher suite names not found in this list or might not diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLParameters.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLParameters.java index 5207c3c1f84..0172929926c 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLParameters.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, 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 @@ -110,7 +110,7 @@ public class SSLParameters { * constructor followed by * {@code setCipherSuites(cipherSuites);}. Note that the * standard list of cipher suite names may be found in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation. Providers * may support cipher suite names not found in this list. @@ -130,7 +130,7 @@ public class SSLParameters { * {@code setCipherSuites(cipherSuites); setProtocols(protocols);}. * Note that the standard list of cipher suite names may be found in the * + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation. Providers * may support cipher suite names not found in this list. @@ -153,7 +153,7 @@ public class SSLParameters { *

    * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -170,7 +170,7 @@ public class SSLParameters { * * @param cipherSuites the array of ciphersuites (or null). Note that the * standard list of cipher suite names may be found in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation. Providers * may support cipher suite names not found in this list or might not @@ -675,4 +675,3 @@ public class SSLParameters { applicationProtocols = tempProtocols; } } - diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocket.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocket.java index ead7d20ae58..aa7b266c3a3 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocket.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -198,7 +198,7 @@ public abstract class SSLServerSocket extends ServerSocket { *

    * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -224,7 +224,7 @@ public abstract class SSLServerSocket extends ServerSocket { *

    * Note that the standard list of cipher suite names may be found in the * + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation. Providers * may support cipher suite names not found in this list or might not @@ -254,7 +254,7 @@ public abstract class SSLServerSocket extends ServerSocket { *

    * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java index 3629aaef3c7..1cbbf9cfcd8 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -126,7 +126,7 @@ public abstract class SSLServerSocketFactory extends ServerSocketFactory *

    * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -147,7 +147,7 @@ public abstract class SSLServerSocketFactory extends ServerSocketFactory *

    * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocket.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocket.java index 2a00d8f7f26..93e082bde07 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocket.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -270,7 +270,7 @@ public abstract class SSLSocket extends Socket *

    * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -296,7 +296,7 @@ public abstract class SSLSocket extends Socket *

    * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -318,7 +318,7 @@ public abstract class SSLSocket extends Socket *

    * Note that the standard list of cipher suite names may be found in the * + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation. Providers * may support cipher suite names not found in this list or might not diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java index d504e1d7a3d..8029b7d6b9a 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -151,7 +151,7 @@ public abstract class SSLSocketFactory extends SocketFactory *

    * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. @@ -170,7 +170,7 @@ public abstract class SSLSocketFactory extends SocketFactory *

    * The returned array includes cipher suites from the list of standard * cipher suite names in the + * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> * JSSE Cipher Suite Names section of the Java Cryptography * Architecture Standard Algorithm Name Documentation, and may also * include other cipher suites that the provider supports. diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java b/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java index 466d52f1d7e..cfd144bd917 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, 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 @@ -43,9 +43,9 @@ import sun.security.jca.GetInstance; *

  • {@code PKIX}
  • * * This algorithm is described in the + * "{@docRoot}/../specs/security/standard-names.html#trustmanagerfactory-algorithms"> * TrustManagerFactory section of the - * Java Cryptography Architecture Standard Algorithm Name Documentation. + * Java Security Standard Algorithm Names Specification. * Consult the release documentation for your implementation to see if any * other algorithms are supported. * diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/package-info.java b/jdk/src/java.base/share/classes/javax/net/ssl/package-info.java index 9fd6868587e..47ea7bf1ff6 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/package-info.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, 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 @@ -31,9 +31,9 @@ * the communicating peers. * * * * @since 1.4 diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java b/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java index 29d42df6855..1f0b6c95597 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, 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 @@ -178,8 +178,8 @@ import sun.security.jca.GetInstance; * constructed by invoking one of the {@code getInstance} factory methods * with a standard type. The default policy type is "JavaLoginConfig". * See the Configuration section in the - * Java Cryptography Architecture Standard Algorithm Name Documentation + * "{@docRoot}/../specs/security/standard-names.html#configuration-types"> + * Java Security Standard Algorithm Names Specification * for a list of standard Configuration types. * * @see javax.security.auth.login.LoginContext @@ -323,9 +323,9 @@ public abstract class Configuration { * * @param type the specified Configuration type. See the Configuration * section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation for a list of standard Configuration types. + * "{@docRoot}/../specs/security/standard-names.html#configuration-types"> + * Java Security Standard Algorithm Names Specification + * for a list of standard Configuration types. * * @param params parameters for the Configuration, which may be null. * @@ -381,9 +381,9 @@ public abstract class Configuration { * * @param type the specified Configuration type. See the Configuration * section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation for a list of standard Configuration types. + * "{@docRoot}/../specs/security/standard-names.html#configuration-types"> + * Java Security Standard Algorithm Names Specification + * for a list of standard Configuration types. * * @param params parameters for the Configuration, which may be null. * @@ -448,9 +448,9 @@ public abstract class Configuration { * * @param type the specified Configuration type. See the Configuration * section in the - * Java Cryptography Architecture Standard Algorithm Name - * Documentation for a list of standard Configuration types. + * "{@docRoot}/../specs/security/standard-names.html#configuration-types"> + * Java Security Standard Algorithm Names Specification + * for a list of standard Configuration types. * * @param params parameters for the Configuration, which may be null. * diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/package-info.java b/jdk/src/java.base/share/classes/javax/security/auth/login/package-info.java index 5b43480dc0a..555b4983f38 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/login/package-info.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/login/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -28,10 +28,9 @@ *

    Package Specification

    * * * * @since 1.4 diff --git a/jdk/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java b/jdk/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java index 3c6061cf18b..54f86346f8b 100644 --- a/jdk/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java +++ b/jdk/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -172,7 +172,7 @@ public final class JarSigner { * * @param algorithm the standard name of the algorithm. See * the {@code MessageDigest} section in the + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> * Java Cryptography Architecture Standard Algorithm Name * Documentation for information about standard algorithm names. * @return the {@code JarSigner.Builder} itself. @@ -192,7 +192,7 @@ public final class JarSigner { * * @param algorithm the standard name of the algorithm. See * the {@code MessageDigest} section in the + * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms"> * Java Cryptography Architecture Standard Algorithm Name * Documentation for information about standard algorithm names. * @param provider the provider. @@ -218,7 +218,7 @@ public final class JarSigner { * * @param algorithm the standard name of the algorithm. See * the {@code Signature} section in the + * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms"> * Java Cryptography Architecture Standard Algorithm Name * Documentation for information about standard algorithm names. * @return the {@code JarSigner.Builder} itself. @@ -245,7 +245,7 @@ public final class JarSigner { * * @param algorithm the standard name of the algorithm. See * the {@code Signature} section in the + * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms"> * Java Cryptography Architecture Standard Algorithm Name * Documentation for information about standard algorithm names. * @param provider the provider. From c74eb4302e985e1e88d7918e2ecea6477a25971c Mon Sep 17 00:00:00 2001 From: Pavel Rappo Date: Wed, 10 May 2017 12:36:14 +0100 Subject: [PATCH 04/26] 8179021: Latest bugfixes to WebSocket/HPACK from the sandbox repo Reviewed-by: dfuchs --- .../java.base/share/classes/module-info.java | 3 +- .../jdk/incubator/http/HttpRequestImpl.java | 4 +- .../http/PlainTunnelingConnection.java | 6 +- .../classes/jdk/incubator/http/WebSocket.java | 95 +----- .../http/internal/hpack/Decoder.java | 5 +- .../http/internal/hpack/HeaderTable.java | 7 +- .../http/internal/websocket/BuilderImpl.java | 22 +- .../websocket/CooperativeHandler.java | 196 +++++++++--- .../http/internal/websocket/Frame.java | 5 +- .../internal/websocket/FrameConsumer.java | 22 +- .../internal/websocket/OpeningHandshake.java | 22 +- .../internal/websocket/OutgoingMessage.java | 15 +- .../http/internal/websocket/Receiver.java | 74 ++--- .../http/internal/websocket/StatusCodes.java | 136 +++------ .../http/internal/websocket/Transmitter.java | 19 +- .../internal/websocket/WebSocketImpl.java | 103 ++++--- .../java/net/httpclient/whitebox/Driver.java | 3 +- .../jdk/incubator/http/RawChannelTest.java | 287 ++++++++++++++++++ 18 files changed, 656 insertions(+), 368 deletions(-) create mode 100644 jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/RawChannelTest.java diff --git a/jdk/src/java.base/share/classes/module-info.java b/jdk/src/java.base/share/classes/module-info.java index 838f215d888..e637bc34d7d 100644 --- a/jdk/src/java.base/share/classes/module-info.java +++ b/jdk/src/java.base/share/classes/module-info.java @@ -190,7 +190,8 @@ module java.base { jdk.unsupported; exports jdk.internal.vm.annotation to jdk.unsupported, - jdk.internal.vm.ci; + jdk.internal.vm.ci, + jdk.incubator.httpclient; exports jdk.internal.util.jar to jdk.jartool, jdk.jdeps, diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java index dcf1de7125a..179cb2d7ad2 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -123,7 +123,7 @@ class HttpRequestImpl extends HttpRequest implements WebSocketRequest { this.method = method; this.systemHeaders = new HttpHeadersImpl(); this.userHeaders = ImmutableHeaders.empty(); - this.uri = null; + this.uri = URI.create("socket://" + authority.getHostString() + ":" + Integer.toString(authority.getPort()) + "/"); this.requestProcessor = HttpRequest.noBody(); this.authority = authority; this.secure = false; diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java index 6432804bd9f..10549315a3d 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -27,6 +27,7 @@ package jdk.incubator.http; import jdk.incubator.http.internal.common.ByteBufferReference; import jdk.incubator.http.internal.common.MinimalFuture; +import jdk.incubator.http.HttpResponse.BodyHandler; import java.io.IOException; import java.net.InetSocketAddress; @@ -72,7 +73,8 @@ class PlainTunnelingConnection extends HttpConnection { public void connect() throws IOException, InterruptedException { delegate.connect(); HttpRequestImpl req = new HttpRequestImpl("CONNECT", client, address); - Exchange connectExchange = new Exchange<>(req, null); + MultiExchange mul = new MultiExchange<>(req, client, BodyHandler.discard(null)); + Exchange connectExchange = new Exchange<>(req, mul); Response r = connectExchange.responseImpl(delegate); if (r.statusCode() != 200) { throw new IOException("Tunnel failed"); diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WebSocket.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WebSocket.java index f657655f408..2433e2499e7 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WebSocket.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WebSocket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -43,7 +43,7 @@ import java.util.concurrent.CompletionStage; *

    To create a {@code WebSocket} use a {@linkplain HttpClient#newWebSocketBuilder( * URI, Listener) builder}. Once a {@code WebSocket} is built, it's ready * to send and receive messages. When the {@code WebSocket} is no longer needed - * it must be closed: a Close message must both be {@linkplain #sendClose() + * it must be closed: a Close message must both be {@linkplain #sendClose * sent} and {@linkplain Listener#onClose(WebSocket, int, String) received}. * The {@code WebSocket} may be also closed {@linkplain #abort() abruptly}. * @@ -93,17 +93,6 @@ public interface WebSocket { */ int NORMAL_CLOSURE = 1000; - /** - * The WebSocket Close message status code ({@value}), is - * designated for use in applications expecting a status code to indicate - * that the connection was closed abnormally, e.g., without sending or - * receiving a Close message. - * - * @see Listener#onClose(WebSocket, int, String) - * @see #abort() - */ - int CLOSED_ABNORMALLY = 1006; - /** * A builder for creating {@code WebSocket} instances. * {@Incubating} @@ -509,7 +498,7 @@ public interface WebSocket { * *

    The {@code WebSocket} will close at the earliest of completion of * the returned {@code CompletionStage} or sending a Close message. In - * particular, if a Close message has been {@link WebSocket#sendClose() + * particular, if a Close message has been {@linkplain WebSocket#sendClose * sent} before, then this invocation completes the closing handshake * and by the time this method is invoked, the {@code WebSocket} will * have been closed. @@ -642,44 +631,6 @@ public interface WebSocket { */ CompletableFuture sendText(CharSequence message, boolean isLast); - /** - * Sends a whole Text message with characters from the given {@code - * CharSequence}. - * - *

    This is a convenience method. For the general case, use {@link - * #sendText(CharSequence, boolean)}. - * - *

    Returns a {@code CompletableFuture} which completes - * normally when the message has been sent or completes exceptionally if an - * error occurs. - * - *

    The {@code CharSequence} must not be modified until the returned - * {@code CompletableFuture} completes (either normally or exceptionally). - * - *

    The returned {@code CompletableFuture} can complete exceptionally - * with: - *

      - *
    • {@link IllegalArgumentException} - - * if {@code message} is a malformed UTF-16 sequence - *
    • {@link IllegalStateException} - - * if the {@code WebSocket} is closed; - * or if a Close message has been sent; - * or if there is an outstanding send operation; - * or if a previous Binary message was sent with {@code isLast == false} - *
    • {@link IOException} - - * if an I/O error occurs during this operation; - * or if the {@code WebSocket} has been closed due to an error; - *
    - * - * @param message - * the message - * - * @return a {@code CompletableFuture} with this {@code WebSocket} - */ - default CompletableFuture sendText(CharSequence message) { - return sendText(message, true); - } - /** * Sends a Binary message with bytes from the given {@code ByteBuffer}. * @@ -831,46 +782,9 @@ public interface WebSocket { * the reason * * @return a {@code CompletableFuture} with this {@code WebSocket} - * - * @see #sendClose() */ CompletableFuture sendClose(int statusCode, String reason); - /** - * Sends an empty Close message. - * - *

    When this method has been invoked, no further messages can be sent. - * - *

    For more details on Close message see RFC 6455 section - * 5.5.1. Close - * - *

    The method returns a {@code CompletableFuture} which - * completes normally when the message has been sent or completes - * exceptionally if an error occurs. - * - *

    The returned {@code CompletableFuture} can complete exceptionally - * with: - *

      - *
    • {@link IOException} - - * if an I/O error occurs during this operation; - * or the {@code WebSocket} has been closed due to an error - *
    - * - *

    If this method has already been invoked or the {@code WebSocket} is - * closed, then subsequent invocations of this method have no effect and the - * returned {@code CompletableFuture} completes normally. - * - *

    If a Close message has been {@linkplain Listener#onClose(WebSocket, - * int, String) received} before, then this invocation completes the closing - * handshake and by the time the returned {@code CompletableFuture} - * completes, the {@code WebSocket} will have been closed. - * - * @return a {@code CompletableFuture} with this {@code WebSocket} - * - * @see #sendClose(int, String) - */ - CompletableFuture sendClose(); - /** * Allows {@code n} more messages to be received by the {@link Listener * Listener}. @@ -928,8 +842,7 @@ public interface WebSocket { * state. * *

    As the result {@link Listener#onClose(WebSocket, int, String) - * Listener.onClose} will be invoked with the status code {@link - * #CLOSED_ABNORMALLY} unless either {@code onClose} or {@link + * Listener.onClose} will be invoked unless either {@code onClose} or {@link * Listener#onError(WebSocket, Throwable) onError} has been invoked before. * In which case no additional invocation will happen. * diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/Decoder.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/Decoder.java index 179bfc616d7..9841204e50c 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/Decoder.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/Decoder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, 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 @@ -24,6 +24,8 @@ */ package jdk.incubator.http.internal.hpack; +import jdk.internal.vm.annotation.Stable; + import java.io.IOException; import java.io.UncheckedIOException; import java.net.ProtocolException; @@ -60,6 +62,7 @@ import static java.util.Objects.requireNonNull; */ public final class Decoder { + @Stable private static final State[] states = new State[256]; static { diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/HeaderTable.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/HeaderTable.java index 508c214b958..970ad42b54d 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/HeaderTable.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/HeaderTable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, 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 @@ -24,6 +24,8 @@ */ package jdk.incubator.http.internal.hpack; +import jdk.internal.vm.annotation.Stable; + import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; @@ -40,6 +42,7 @@ import static java.lang.String.format; // final class HeaderTable { + @Stable private static final HeaderField[] staticTable = { null, // To make index 1-based, instead of 0-based new HeaderField(":authority"), @@ -110,7 +113,7 @@ final class HeaderTable { private static final Map> staticIndexes; static { - staticIndexes = new HashMap<>(STATIC_TABLE_LENGTH); + staticIndexes = new HashMap<>(STATIC_TABLE_LENGTH); // TODO: Map.of for (int i = 1; i <= STATIC_TABLE_LENGTH; i++) { HeaderField f = staticTable[i]; Map values = staticIndexes diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/BuilderImpl.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/BuilderImpl.java index 15abf5e76bd..7f662922bc0 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/BuilderImpl.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/BuilderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -46,7 +46,7 @@ public final class BuilderImpl implements Builder { private final HttpClient client; private final URI uri; private final Listener listener; - private final List> headers = new LinkedList<>(); + private final Collection> headers = new LinkedList<>(); private final Collection subprotocols = new LinkedList<>(); private Duration timeout; @@ -65,17 +65,18 @@ public final class BuilderImpl implements Builder { } @Override - public Builder subprotocols(String mostPreferred, String... lesserPreferred) + public Builder subprotocols(String mostPreferred, + String... lesserPreferred) { requireNonNull(mostPreferred, "mostPreferred"); requireNonNull(lesserPreferred, "lesserPreferred"); List subprotocols = new LinkedList<>(); + subprotocols.add(mostPreferred); for (int i = 0; i < lesserPreferred.length; i++) { String p = lesserPreferred[i]; requireNonNull(p, "lesserPreferred[" + i + "]"); subprotocols.add(p); } - subprotocols.add(0, mostPreferred); this.subprotocols.clear(); this.subprotocols.addAll(subprotocols); return this; @@ -98,20 +99,9 @@ public final class BuilderImpl implements Builder { Listener getListener() { return listener; } - List> getHeaders() { return headers; } + Collection> getHeaders() { return headers; } Collection getSubprotocols() { return subprotocols; } Duration getConnectTimeout() { return timeout; } - - @Override - public String toString() { - return "WebSocket.Builder{" - + ", uri=" + uri - + ", listener=" + listener - + (!headers.isEmpty() ? ", headers=" + headers : "") - + (!subprotocols.isEmpty() ? ", subprotocols=" + subprotocols : "") - + ( timeout != null ? ", connectTimeout=" + timeout : "") - + '}'; - } } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/CooperativeHandler.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/CooperativeHandler.java index 5e36a487a12..1ccec2d4e8a 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/CooperativeHandler.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/CooperativeHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, 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 @@ -25,70 +25,184 @@ package jdk.incubator.http.internal.websocket; -import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Consumer; import static java.util.Objects.requireNonNull; -final class CooperativeHandler { +/* + * A synchronization aid that assists a number of parties in running a task + * in a mutually exclusive fashion. + * + * To run the task, a party invokes `handle`. To permanently prevent the task + * from subsequent runs, the party invokes `stop`. + * + * The parties do not have to operate in different threads. + * + * The task can be either synchronous or asynchronous. + * + * If the task is synchronous, it is represented with `Runnable`. + * The handler invokes `Runnable.run` to run the task. + * + * If the task is asynchronous, it is represented with `Consumer`. + * The handler invokes `Consumer.accept(end)` to begin the task. The task + * invokes `end.run()` when it has ended. + * + * The next run of the task will not begin until the previous run has finished. + * + * The task may invoke `handle()` by itself, it's a normal situation. + */ +public final class CooperativeHandler { - private static final long CONTINUE = 0; - private static final long OFF = 1; - private static final long ON = 2; - private static final long STOP = 4; + /* + Since the task is fixed and known beforehand, no blocking synchronization + (locks, queues, etc.) is required. The job can be done solely using + nonblocking primitives. - private final AtomicLong state = new AtomicLong(OFF); + The machinery below addresses two problems: - private final Runnable task; + 1. Running the task in a sequential order (no concurrent runs): - CooperativeHandler(Runnable task) { - this.task = requireNonNull(task); + begin, end, begin, end... + + 2. Avoiding indefinite recursion: + + begin + end + begin + end + ... + + Problem #1 is solved with a finite state machine with 4 states: + + BEGIN, AGAIN, END, and STOP. + + Problem #2 is solved with a "state modifier" OFFLOAD. + + Parties invoke `handle()` to signal the task must run. A party that has + invoked `handle()` either begins the task or exploits the party that is + either beginning the task or ending it. + + The party that is trying to end the task either ends it or begins it + again. + + To avoid indefinite recursion, before re-running the task tryEnd() sets + OFFLOAD bit, signalling to its "child" tryEnd() that this ("parent") + tryEnd() is available and the "child" must offload the task on to the + "parent". Then a race begins. Whichever invocation of tryEnd() manages + to unset OFFLOAD bit first does not do the work. + + There is at most 1 thread that is beginning the task and at most 2 + threads that are trying to end it: "parent" and "child". In case of a + synchronous task "parent" and "child" are the same thread. + */ + + private static final int OFFLOAD = 1; + private static final int AGAIN = 2; + private static final int BEGIN = 4; + private static final int STOP = 8; + private static final int END = 16; + + private final AtomicInteger state = new AtomicInteger(END); + private final Consumer begin; + + public CooperativeHandler(Runnable task) { + this(asyncOf(task)); + } + + public CooperativeHandler(Consumer begin) { + this.begin = requireNonNull(begin); } /* - * Causes the task supplied to the constructor to run. The task may be run - * by this thread as well as by any other that has invoked this method. + * Runs the task (though maybe by a different party). * * The recursion which is possible here will have the maximum depth of 1: * - * task.run() - * this.startOrContinue() - * task.run() + * this.handle() + * begin.accept() + * this.handle() */ - void startOrContinue() { - long s; + public void handle() { while (true) { - s = state.get(); - if (s == OFF && state.compareAndSet(OFF, ON)) { - // No one is running the task, we are going to run it - break; - } - if (s == ON && state.compareAndSet(ON, CONTINUE)) { - // Some other thread is running the task. We have managed to - // update the state, it will be surely noticed by that thread. - return; - } - if (s == CONTINUE || s == STOP) { + int s = state.get(); + if (s == END) { + if (state.compareAndSet(END, BEGIN)) { + break; + } + } else if ((s & BEGIN) != 0) { + // Tries to change the state to AGAIN, preserving OFFLOAD bit + if (state.compareAndSet(s, AGAIN | (s & OFFLOAD))) { + return; + } + } else if ((s & AGAIN) != 0 || s == STOP) { return; + } else { + throw new InternalError(String.valueOf(s)); } } + begin.accept(this::tryEnd); + } + + private void tryEnd() { while (true) { - task.run(); - // State checks are ordered by the probability of expected values - // (it might be different in different usage patterns, say, when - // invocations to `startOrContinue()` are concurrent) - if (state.compareAndSet(ON, OFF)) { - break; // The state hasn't changed, all done + int s; + while (((s = state.get()) & OFFLOAD) != 0) { + // Tries to offload ending of the task to the parent + if (state.compareAndSet(s, s & ~OFFLOAD)) { + return; + } } - if (state.compareAndSet(CONTINUE, ON)) { - continue; + while (true) { + if (s == BEGIN) { + if (state.compareAndSet(BEGIN, END)) { + return; + } + } else if (s == AGAIN) { + if (state.compareAndSet(AGAIN, BEGIN | OFFLOAD)) { + break; + } + } else if (s == STOP) { + return; + } else { + throw new InternalError(String.valueOf(s)); + } + s = state.get(); } - // Other threads can change the state from CONTINUE to STOP only - // So if it's not ON and not CONTINUE, it can only be STOP - break; + begin.accept(this::tryEnd); } } - void stop() { + /* + * Checks whether or not this handler has been permanently stopped. + * + * Should be used from inside the task to poll the status of the handler, + * pretty much the same way as it is done for threads: + * + * if (!Thread.currentThread().isInterrupted()) { + * ... + * } + */ + public boolean isStopped() { + return state.get() == STOP; + } + + /* + * Signals this handler to ignore subsequent invocations to `handle()`. + * + * If the task has already begun, this invocation will not affect it, + * unless the task itself uses `isStopped()` method to check the state + * of the handler. + */ + public void stop() { state.set(STOP); } + + private static Consumer asyncOf(Runnable task) { + requireNonNull(task); + return ender -> { + task.run(); + ender.run(); + }; + } } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Frame.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Frame.java index 813693aff8f..47a0ff21bde 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Frame.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Frame.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -25,6 +25,8 @@ package jdk.incubator.http.internal.websocket; +import jdk.internal.vm.annotation.Stable; + import java.nio.ByteBuffer; import static jdk.incubator.http.internal.common.Utils.dump; @@ -58,6 +60,7 @@ final class Frame { CONTROL_0xE (0xE), CONTROL_0xF (0xF); + @Stable private static final Opcode[] opcodes; static { diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/FrameConsumer.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/FrameConsumer.java index d6b32d704ee..1fe63664499 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/FrameConsumer.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/FrameConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -38,7 +38,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static jdk.incubator.http.internal.common.Utils.dump; import static jdk.incubator.http.internal.websocket.StatusCodes.NO_STATUS_CODE; -import static jdk.incubator.http.internal.websocket.StatusCodes.checkIncomingCode; +import static jdk.incubator.http.internal.websocket.StatusCodes.isLegalToReceiveFromServer; /* * Consumes frame parts and notifies a message consumer, when there is @@ -212,20 +212,20 @@ class FrameConsumer implements Frame.Consumer { } switch (opcode) { case CLOSE: - int statusCode = NO_STATUS_CODE; + char statusCode = NO_STATUS_CODE; String reason = ""; if (payloadLen != 0) { int len = binaryData.remaining(); assert 2 <= len && len <= 125 : dump(len, payloadLen); - try { - statusCode = checkIncomingCode(binaryData.getChar()); - reason = UTF_8.newDecoder().decode(binaryData).toString(); - } catch (CheckFailedException e) { - throw new FailWebSocketException("Incorrect status code") - .initCause(e); - } catch (CharacterCodingException e) { + statusCode = binaryData.getChar(); + if (!isLegalToReceiveFromServer(statusCode)) { throw new FailWebSocketException( - "Close reason is a malformed UTF-8 sequence") + "Illegal status code: " + statusCode); + } + try { + reason = UTF_8.newDecoder().decode(binaryData).toString(); + } catch (CharacterCodingException e) { + throw new FailWebSocketException("Illegal close reason") .initCause(e); } } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/OpeningHandshake.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/OpeningHandshake.java index 460b3b2b011..4af7771d8c2 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/OpeningHandshake.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/OpeningHandshake.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -37,6 +37,8 @@ import jdk.incubator.http.HttpRequest; import jdk.incubator.http.HttpResponse; import jdk.incubator.http.HttpResponse.BodyHandler; import jdk.incubator.http.WebSocketHandshakeException; +import jdk.incubator.http.internal.common.Pair; + import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; @@ -66,7 +68,6 @@ final class OpeningHandshake { private static final String HEADER_KEY = "Sec-WebSocket-Key"; private static final String HEADER_PROTOCOL = "Sec-WebSocket-Protocol"; private static final String HEADER_VERSION = "Sec-WebSocket-Version"; - private static final String VALUE_VERSION = "13"; // WebSocket's lucky number private static final Set FORBIDDEN_HEADERS; @@ -106,12 +107,18 @@ final class OpeningHandshake { if (connectTimeout != null) { requestBuilder.timeout(connectTimeout); } + for (Pair p : b.getHeaders()) { + if (FORBIDDEN_HEADERS.contains(p.first)) { + throw illegal("Illegal header: " + p.first); + } + requestBuilder.header(p.first, p.second); + } this.subprotocols = createRequestSubprotocols(b.getSubprotocols()); if (!this.subprotocols.isEmpty()) { String p = this.subprotocols.stream().collect(Collectors.joining(", ")); requestBuilder.header(HEADER_PROTOCOL, p); } - requestBuilder.header(HEADER_VERSION, VALUE_VERSION); + requestBuilder.header(HEADER_VERSION, "13"); // WebSocket's lucky number this.nonce = createNonce(); requestBuilder.header(HEADER_KEY, this.nonce); // Setting request version to HTTP/1.1 forcibly, since it's not possible @@ -133,11 +140,7 @@ final class OpeningHandshake { if (s.trim().isEmpty() || !isValidName(s)) { throw illegal("Bad subprotocol syntax: " + s); } - if (FORBIDDEN_HEADERS.contains(s)) { - throw illegal("Forbidden header: " + s); - } - boolean unique = sp.add(s); - if (!unique) { + if (!sp.add(s)) { throw illegal("Duplicating subprotocol: " + s); } } @@ -176,7 +179,7 @@ final class OpeningHandshake { CompletableFuture send() { return client.sendAsync(this.request, BodyHandler.discard(null)) - .thenCompose(this::resultFrom); + .thenCompose(this::resultFrom); } /* @@ -283,7 +286,6 @@ final class OpeningHandshake { private static String requireSingle(HttpHeaders responseHeaders, String headerName) - throws CheckFailedException { List values = responseHeaders.allValues(headerName); if (values.isEmpty()) { diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/OutgoingMessage.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/OutgoingMessage.java index 76d7c8db55f..c1dc19f756e 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/OutgoingMessage.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/OutgoingMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -60,6 +60,7 @@ import static jdk.incubator.http.internal.websocket.Frame.Opcode.TEXT; */ abstract class OutgoingMessage { + // Share per WebSocket? private static final SecureRandom maskingKeys = new SecureRandom(); protected ByteBuffer[] frame; @@ -71,6 +72,8 @@ abstract class OutgoingMessage { * convenient moment (up to the point where sentTo is invoked). */ protected void contextualize(Context context) { + // masking and charset decoding should be performed here rather than in + // the constructor (as of today) if (context.isCloseSent()) { throw new IllegalStateException("Close sent"); } @@ -101,7 +104,7 @@ abstract class OutgoingMessage { private final boolean isLast; Text(CharSequence characters, boolean isLast) { - CharsetEncoder encoder = UTF_8.newEncoder(); + CharsetEncoder encoder = UTF_8.newEncoder(); // Share per WebSocket? try { payload = encoder.encode(CharBuffer.wrap(characters)); } catch (CharacterCodingException e) { @@ -172,11 +175,11 @@ abstract class OutgoingMessage { Close(int statusCode, CharSequence reason) { ByteBuffer payload = ByteBuffer.allocate(125) - .putChar((char) statusCode); + .putChar((char) statusCode); CoderResult result = UTF_8.newEncoder() - .encode(CharBuffer.wrap(reason), - payload, - true); + .encode(CharBuffer.wrap(reason), + payload, + true); if (result.isOverflow()) { throw new IllegalArgumentException("Long reason"); } else if (result.isError()) { diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Receiver.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Receiver.java index a2a0ea59aab..4168da9b52b 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Receiver.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Receiver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -58,8 +58,8 @@ final class Receiver { private final Frame.Reader reader = new Frame.Reader(); private final RawChannel.RawEvent event = createHandler(); private final AtomicLong demand = new AtomicLong(); - private final CooperativeHandler receiveHandler = - new CooperativeHandler(this::tryDeliver); + private final CooperativeHandler handler = + new CooperativeHandler(this::pushContinuously); /* * Used to ensure registering the channel event at most once (i.e. to avoid * multiple registrations). @@ -72,8 +72,8 @@ final class Receiver { this.channel = channel; this.data = channel.initialByteBuffer(); this.frameConsumer = new FrameConsumer(this.messageConsumer); - // To ensure the initial `data` will be read correctly (happens-before) - // after readable.get() + // To ensure the initial non-final `data` will be read correctly + // (happens-before) by reader after executing readable.get() readable.set(true); } @@ -88,7 +88,7 @@ final class Receiver { @Override public void handle() { readable.set(true); - receiveHandler.startOrContinue(); + handler.handle(); } }; } @@ -98,7 +98,7 @@ final class Receiver { throw new IllegalArgumentException("Negative: " + n); } demand.accumulateAndGet(n, (p, i) -> p + i < 0 ? Long.MAX_VALUE : p + i); - receiveHandler.startOrContinue(); + handler.handle(); } void acknowledge() { @@ -113,41 +113,21 @@ final class Receiver { * regardless of the current demand. */ void close() { - receiveHandler.stop(); + handler.stop(); } - private void tryDeliver() { - if (readable.get() && demand.get() > 0) { - deliverAtMostOne(); + private void pushContinuously() { + while (readable.get() && demand.get() > 0 && !handler.isStopped()) { + pushOnce(); } } - private void deliverAtMostOne() { - if (data == null) { - try { - data = channel.read(); - } catch (IOException e) { - readable.set(false); - messageConsumer.onError(e); - return; - } - if (data == null || !data.hasRemaining()) { - readable.set(false); - if (!data.hasRemaining()) { - try { - channel.registerEvent(event); - } catch (IOException e) { - messageConsumer.onError(e); - return; - } - } else if (data == null) { - messageConsumer.onComplete(); - } - return; - } + private void pushOnce() { + if (data == null && !readData()) { + return; } try { - reader.readFrame(data, frameConsumer); + reader.readFrame(data, frameConsumer); // Pushing frame parts to the consumer } catch (FailWebSocketException e) { messageConsumer.onError(e); return; @@ -156,4 +136,28 @@ final class Receiver { data = null; } } + + private boolean readData() { + try { + data = channel.read(); + } catch (IOException e) { + messageConsumer.onError(e); + return false; + } + if (data == null) { // EOF + messageConsumer.onComplete(); + return false; + } else if (!data.hasRemaining()) { // No data in the socket at the moment + data = null; + readable.set(false); + try { + channel.registerEvent(event); + } catch (IOException e) { + messageConsumer.onError(e); + } + return false; + } + assert data.hasRemaining(); + return true; + } } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/StatusCodes.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/StatusCodes.java index 17ac991a66d..f262005ec69 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/StatusCodes.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/StatusCodes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, 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 @@ -25,120 +25,72 @@ package jdk.incubator.http.internal.websocket; -import static jdk.incubator.http.WebSocket.CLOSED_ABNORMALLY; - /* - * Utilities and common constants for WebSocket status codes. For more details - * on status codes and their meaning see: + * Utilities for WebSocket status codes. * * 1. https://tools.ietf.org/html/rfc6455#section-7.4 * 2. http://www.iana.org/assignments/websocket/websocket.xhtml#close-code-number */ final class StatusCodes { - static final int PROTOCOL_ERROR = 1002; - static final int CANNOT_ACCEPT = 1003; - static final int NO_STATUS_CODE = 1005; - static final int NOT_CONSISTENT = 1007; - static final int TOO_BIG = 1009; - static final int NO_EXTENSION = 1010; - static final int SERVICE_RESTART = 1012; - static final int TRY_AGAIN_LATER = 1013; - static final int TLS_HANDSHAKE_FAILURE = 1015; + static final int PROTOCOL_ERROR = 1002; + static final int NO_STATUS_CODE = 1005; + static final int CLOSED_ABNORMALLY = 1006; + static final int NOT_CONSISTENT = 1007; private StatusCodes() { } - /* - * Returns the given code if it doesn't violate any rules for outgoing - * codes, otherwise throws a CFE with a detailed description. - */ - static int checkOutgoingCode(int code) { - checkCommon(code); + static boolean isLegalToSendFromClient(int code) { + if (!isLegal(code)) { + return false; + } + // Codes from unreserved range if (code > 4999) { - throw new CheckFailedException("Unspecified: " + code); + return false; } - if (isNotUserSettable(code)) { - throw new CheckFailedException("Cannot set: " + code); - } - return code; - } - - /* - * Returns the given code if it doesn't violate any rules for incoming - * codes, otherwise throws a CFE with a detailed description. - */ - static int checkIncomingCode(int code) { - checkCommon(code); - if (code == NO_EXTENSION) { - throw new CheckFailedException("Bad server code: " + code); - } - return code; - } - - private static int checkCommon(int code) { - if (isOutOfRange(code)) { - throw new CheckFailedException("Out of range: " + code); - } - if (isForbidden(code)) { - throw new CheckFailedException("Forbidden: " + code); - } - if (isUnassigned(code)) { - throw new CheckFailedException("Unassigned: " + code); - } - return code; - } - - /* - * Returns true if the given code cannot be set by a user of the WebSocket - * API. e.g. this code means something which only a WebSocket implementation - * is responsible for or it doesn't make sense to be send by a WebSocket - * client. - */ - private static boolean isNotUserSettable(int code) { + // Codes below are not allowed to be sent using a WebSocket client API switch (code) { case PROTOCOL_ERROR: - case CANNOT_ACCEPT: case NOT_CONSISTENT: - case TOO_BIG: - case NO_EXTENSION: - case TRY_AGAIN_LATER: - case SERVICE_RESTART: - return true; - default: + case 1003: + case 1009: + case 1010: + case 1012: // code sent by servers + case 1013: // code sent by servers + case 1014: // code sent by servers return false; + default: + return true; } } - /* - * Returns true if the given code cannot appear on the wire. It's always an - * error to send a frame with such a code or to receive one. - */ - private static boolean isForbidden(int code) { + static boolean isLegalToReceiveFromServer(int code) { + if (!isLegal(code)) { + return false; + } + return code != 1010; // code sent by clients + } + + private static boolean isLegal(int code) { + // 2-byte unsigned integer excluding first 1000 numbers from the range + // [0, 999] which are never used + if (code < 1000 || code > 65535) { + return false; + } + // Codes from the range below has no known meaning under the WebSocket + // specification (i.e. unassigned/undefined) + if ((code >= 1016 && code <= 2999) || code == 1004) { + return false; + } + // Codes below cannot appear on the wire. It's always an error either + // to send a frame with such a code or to receive one. switch (code) { case NO_STATUS_CODE: case CLOSED_ABNORMALLY: - case TLS_HANDSHAKE_FAILURE: - return true; - default: + case 1015: return false; + default: + return true; } } - - /* - * Returns true if the given code has no known meaning under the WebSocket - * specification (i.e. unassigned/undefined). - */ - private static boolean isUnassigned(int code) { - return (code >= 1016 && code <= 2999) || code == 1004 || code == 1014; - } - - /* - * Returns true if the given code is not in domain of status codes: - * - * 2-byte unsigned integer minus first 1000 numbers from the range [0, 999] - * that are never used. - */ - private static boolean isOutOfRange(int code) { - return code < 1000 || code > 65535; - } } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Transmitter.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Transmitter.java index 083283bc5f3..4991515cbb6 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Transmitter.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Transmitter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -37,11 +37,12 @@ import static java.util.Objects.requireNonNull; * * No matter whether the message has been fully sent or an error has occurred, * the transmitter reports the outcome to the supplied handler and becomes ready - * to accept a new message. Until then, it is considered "busy" and an - * IllegalStateException will be thrown on each attempt to invoke send. + * to accept a new message. Until then, the transmitter is considered "busy" and + * an IllegalStateException will be thrown on each attempt to invoke send. */ final class Transmitter { + /* This flag is used solely for assertions */ private final AtomicBoolean busy = new AtomicBoolean(); private OutgoingMessage message; private Consumer completionHandler; @@ -53,9 +54,10 @@ final class Transmitter { this.event = createHandler(); } - /* - * The supplied handler may be invoked in the calling thread, so watch out - * for stack overflow. + /** + * The supplied handler may be invoked in the calling thread. + * A {@code StackOverflowError} may thus occur if there's a possibility + * that this method is called again by the supplied handler. */ void send(OutgoingMessage message, Consumer completionHandler) { requireNonNull(message); @@ -86,8 +88,9 @@ final class Transmitter { private void send0(OutgoingMessage message, Consumer handler) { boolean b = busy.get(); assert b; // Please don't inline this, as busy.get() has memory - // visibility effects and we don't want the correctness - // of the algorithm to depend on assertions flag + // visibility effects and we don't want the program behaviour + // to depend on whether the assertions are turned on + // or turned off try { boolean sent = message.sendTo(channel); if (sent) { diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java index 863211d5948..74d1445fc29 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -51,9 +51,9 @@ import java.util.function.Function; import static java.util.Objects.requireNonNull; import static java.util.concurrent.CompletableFuture.failedFuture; import static jdk.incubator.http.internal.common.Pair.pair; +import static jdk.incubator.http.internal.websocket.StatusCodes.CLOSED_ABNORMALLY; import static jdk.incubator.http.internal.websocket.StatusCodes.NO_STATUS_CODE; -import static jdk.incubator.http.internal.websocket.StatusCodes.TLS_HANDSHAKE_FAILURE; -import static jdk.incubator.http.internal.websocket.StatusCodes.checkOutgoingCode; +import static jdk.incubator.http.internal.websocket.StatusCodes.isLegalToSendFromClient; /* * A WebSocket client. @@ -74,8 +74,8 @@ final class WebSocketImpl implements WebSocket { private final AtomicBoolean outstandingSend = new AtomicBoolean(); private final CooperativeHandler sendHandler = new CooperativeHandler(this::sendFirst); - private final Queue>> queue = - new ConcurrentLinkedQueue<>(); + private final Queue>> + queue = new ConcurrentLinkedQueue<>(); private final Context context = new OutgoingMessage.Context(); private final Transmitter transmitter; private final Receiver receiver; @@ -110,6 +110,9 @@ final class WebSocketImpl implements WebSocket { r.subprotocol, r.channel, b.getListener()); + // The order of calls might cause a subtle effects, like CF will be + // returned from the buildAsync _after_ onOpen has been signalled. + // This means if onOpen is lengthy, it might cause some problems. ws.signalOpen(); return ws; }; @@ -125,7 +128,8 @@ final class WebSocketImpl implements WebSocket { WebSocketImpl(URI uri, String subprotocol, RawChannel channel, - Listener listener) { + Listener listener) + { this.uri = requireNonNull(uri); this.subprotocol = requireNonNull(subprotocol); this.channel = requireNonNull(channel); @@ -182,15 +186,17 @@ final class WebSocketImpl implements WebSocket { * Processes a Close event that came from the channel. Invoked at most once. */ private void processClose(int statusCode, String reason) { - assert statusCode != TLS_HANDSHAKE_FAILURE; // TLS problems happen long before WebSocket is alive receiver.close(); try { channel.shutdownInput(); } catch (IOException e) { Log.logError(e); } - boolean wasComplete = !closeReceived.complete(null); - if (wasComplete) { + boolean alreadyCompleted = !closeReceived.complete(null); + if (alreadyCompleted) { + // This CF is supposed to be completed only once, the first time a + // Close message is received. No further messages are pulled from + // the socket. throw new InternalError(); } int code; @@ -261,19 +267,17 @@ final class WebSocketImpl implements WebSocket { @Override public CompletableFuture sendClose(int statusCode, String reason) { - try { - checkOutgoingCode(statusCode); - } catch (CheckFailedException e) { - IllegalArgumentException ex = new IllegalArgumentException( - "Bad status code: " + statusCode, e); - failedFuture(ex); + if (!isLegalToSendFromClient(statusCode)) { + return failedFuture( + new IllegalArgumentException("statusCode: " + statusCode)); } - return enqueueClose(new Close(statusCode, reason)); - } - - @Override - public CompletableFuture sendClose() { - return enqueueClose(new Close()); + Close msg; + try { + msg = new Close(statusCode, reason); + } catch (IllegalArgumentException e) { + return failedFuture(e); + } + return enqueueClose(msg); } /* @@ -288,8 +292,8 @@ final class WebSocketImpl implements WebSocket { } catch (IOException e) { Log.logError(e); } - boolean wasComplete = !closeSent.complete(null); - if (wasComplete) { + boolean alreadyCompleted = !closeSent.complete(null); + if (alreadyCompleted) { // Shouldn't happen as this callback must run at most once throw new InternalError(); } @@ -316,40 +320,41 @@ final class WebSocketImpl implements WebSocket { private CompletableFuture enqueue(OutgoingMessage m) { CompletableFuture cf = new CompletableFuture<>(); - Consumer h = e -> { - if (e == null) { - cf.complete(WebSocketImpl.this); - sendHandler.startOrContinue(); - } else { - -// what if this is not a users message? (must be different entry points for different messages) - - // TODO: think about correct behaviour in the face of error in - // the queue, for now it seems like the best solution is to - // deliver the error and stop - cf.completeExceptionally(e); - } - }; - queue.add(pair(m, h)); // Always returns true - sendHandler.startOrContinue(); + boolean added = queue.add(pair(m, cf)); + if (!added) { + // The queue is supposed to be unbounded + throw new InternalError(); + } + sendHandler.handle(); return cf; } - private void sendFirst() { - Pair> p = queue.poll(); + /* + * This is the main sending method. It may be run in different threads, + * but never concurrently. + */ + private void sendFirst(Runnable whenSent) { + Pair> p = queue.poll(); if (p == null) { + whenSent.run(); return; } OutgoingMessage message = p.first; - Consumer h = p.second; + CompletableFuture cf = p.second; try { - // At this point messages are finally ordered and will be written - // one by one in a mutually exclusive fashion; thus it's a pretty - // convenient place to contextualize them message.contextualize(context); + Consumer h = e -> { + if (e == null) { + cf.complete(WebSocketImpl.this); + } else { + cf.completeExceptionally(e); + } + sendHandler.handle(); + whenSent.run(); + }; transmitter.send(message, h); } catch (Exception t) { - h.accept(t); + cf.completeExceptionally(t); } } @@ -381,7 +386,7 @@ final class WebSocketImpl implements WebSocket { @Override public String toString() { return super.toString() - + "[" + (closed.get() ? "OPEN" : "CLOSED") + "]: " + uri + + "[" + (closed.get() ? "CLOSED" : "OPEN") + "]: " + uri + (!subprotocol.isEmpty() ? ", subprotocol=" + subprotocol : ""); } @@ -476,7 +481,9 @@ final class WebSocketImpl implements WebSocket { int code = ((FailWebSocketException) error).getStatusCode(); enqueueClose(new Close(code, "")) .whenComplete((r, e) -> { - ex.addSuppressed(e); + if (e != null) { + ex.addSuppressed(e); + } try { channel.close(); } catch (IOException e1) { diff --git a/jdk/test/java/net/httpclient/whitebox/Driver.java b/jdk/test/java/net/httpclient/whitebox/Driver.java index c85b8f076c6..5b9e3438989 100644 --- a/jdk/test/java/net/httpclient/whitebox/Driver.java +++ b/jdk/test/java/net/httpclient/whitebox/Driver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, 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 @@ -26,5 +26,6 @@ * @bug 8151299 8164704 * @modules jdk.incubator.httpclient * @run testng jdk.incubator.httpclient/jdk.incubator.http.SelectorTest + * @run testng jdk.incubator.httpclient/jdk.incubator.http.RawChannelTest * @run testng jdk.incubator.httpclient/jdk.incubator.http.ResponseHeadersTest */ diff --git a/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/RawChannelTest.java b/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/RawChannelTest.java new file mode 100644 index 00000000000..f74c9889611 --- /dev/null +++ b/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/RawChannelTest.java @@ -0,0 +1,287 @@ +/* + * Copyright (c) 2017, 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. + */ + +package jdk.incubator.http; + +import jdk.incubator.http.internal.websocket.RawChannel; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.UncheckedIOException; +import java.net.ServerSocket; +import java.net.Socket; +import java.net.URI; +import java.nio.ByteBuffer; +import java.nio.channels.SelectionKey; +import java.util.Random; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; + +import static jdk.incubator.http.HttpResponse.BodyHandler.discard; +import static org.testng.Assert.assertEquals; + +/* + * This test exercises mechanics of _independent_ reads and writes on the + * RawChannel. It verifies that the underlying implementation can manage more + * than a single type of notifications at the same time. + */ +public class RawChannelTest { + + private final AtomicLong clientWritten = new AtomicLong(); + private final AtomicLong serverWritten = new AtomicLong(); + private final AtomicLong clientRead = new AtomicLong(); + private final AtomicLong serverRead = new AtomicLong(); + + /* + * Since at this level we don't have any control over the low level socket + * parameters, this latch ensures a write to the channel will stall at least + * once (socket's send buffer filled up). + */ + private final CountDownLatch writeStall = new CountDownLatch(1); + + /* + * This one works similarly by providing means to ensure a read from the + * channel will stall at least once (no more data available on the socket). + */ + private final CountDownLatch readStall = new CountDownLatch(1); + + private final AtomicInteger writeHandles = new AtomicInteger(); + private final AtomicInteger readHandles = new AtomicInteger(); + + private final CountDownLatch exit = new CountDownLatch(1); + + @Test + public void test() throws Exception { + try (ServerSocket server = new ServerSocket(0)) { + int port = server.getLocalPort(); + new TestServer(server).start(); + final RawChannel chan = channelOf(port); + + // It's very important not to forget the initial bytes, possibly + // left from the HTTP thingy + int initialBytes = chan.initialByteBuffer().remaining(); + print("RawChannel has %s initial bytes", initialBytes); + clientRead.addAndGet(initialBytes); + + chan.registerEvent(new RawChannel.RawEvent() { + + private final ByteBuffer reusableBuffer = ByteBuffer.allocate(32768); + + @Override + public int interestOps() { + return SelectionKey.OP_WRITE; + } + + @Override + public void handle() { + int i = writeHandles.incrementAndGet(); + print("OP_WRITE #%s", i); + if (i > 3) { // Fill up the send buffer not more than 3 times + try { + chan.shutdownOutput(); + } catch (IOException e) { + e.printStackTrace(); + } + return; + } + long total = 0; + try { + long n; + do { + ByteBuffer[] array = {reusableBuffer.slice()}; + n = chan.write(array, 0, 1); + total += n; + } while (n > 0); + print("OP_WRITE clogged SNDBUF with %s bytes", total); + clientWritten.addAndGet(total); + chan.registerEvent(this); + writeStall.countDown(); // signal send buffer is full + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + }); + + chan.registerEvent(new RawChannel.RawEvent() { + + @Override + public int interestOps() { + return SelectionKey.OP_READ; + } + + @Override + public void handle() { + int i = readHandles.incrementAndGet(); + print("OP_READ #%s", i); + ByteBuffer read = null; + long total = 0; + while (true) { + try { + read = chan.read(); + } catch (IOException e) { + e.printStackTrace(); + } + if (read == null) { + print("OP_READ EOF"); + break; + } else if (!read.hasRemaining()) { + print("OP_READ stall"); + try { + chan.registerEvent(this); + } catch (IOException e) { + e.printStackTrace(); + } + readStall.countDown(); + break; + } + int r = read.remaining(); + total += r; + clientRead.addAndGet(r); + } + print("OP_READ read %s bytes", total); + } + }); + exit.await(); // All done, we need to compare results: + assertEquals(clientRead.get(), serverWritten.get()); + assertEquals(serverRead.get(), clientWritten.get()); + } + } + + private static RawChannel channelOf(int port) throws Exception { + URI uri = URI.create("http://127.0.0.1:" + port + "/"); + print("raw channel to %s", uri.toString()); + HttpRequest req = HttpRequest.newBuilder(uri).build(); + HttpResponse r = HttpClient.newHttpClient().send(req, discard(null)); + r.body(); + return ((HttpResponseImpl) r).rawChannel(); + } + + private class TestServer extends Thread { // Powered by Slowpokes + + private final ServerSocket server; + + TestServer(ServerSocket server) throws IOException { + this.server = server; + } + + @Override + public void run() { + try (Socket s = server.accept()) { + InputStream is = s.getInputStream(); + OutputStream os = s.getOutputStream(); + + processHttp(is, os); + + Thread reader = new Thread(() -> { + try { + long n = readSlowly(is); + print("Server read %s bytes", n); + serverRead.addAndGet(n); + s.shutdownInput(); + } catch (Exception e) { + e.printStackTrace(); + } + }); + + Thread writer = new Thread(() -> { + try { + long n = writeSlowly(os); + print("Server written %s bytes", n); + serverWritten.addAndGet(n); + s.shutdownOutput(); + } catch (Exception e) { + e.printStackTrace(); + } + }); + + reader.start(); + writer.start(); + + reader.join(); + writer.join(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + exit.countDown(); + } + } + + private void processHttp(InputStream is, OutputStream os) + throws IOException + { + os.write("HTTP/1.1 200 OK\r\nContent-length: 0\r\n\r\n".getBytes()); + byte[] buf = new byte[1024]; + String s = ""; + while (true) { + int n = is.read(buf); + if (n <= 0) { + throw new RuntimeException("Unexpected end of request"); + } + s = s + new String(buf, 0, n); + if (s.contains("\r\n\r\n")) { + break; + } + } + } + + private long writeSlowly(OutputStream os) throws Exception { + byte[] first = byteArrayOfSize(1024); + long total = first.length; + os.write(first); + // Let's wait for the signal from the raw channel that its read has + // stalled, and then continue sending a bit more stuff + readStall.await(); + for (int i = 0; i < 32; i++) { + byte[] b = byteArrayOfSize(1024); + os.write(b); + total += b.length; + TimeUnit.MILLISECONDS.sleep(1); + } + return total; + } + + private long readSlowly(InputStream is) throws Exception { + // Wait for the raw channel to fill up the its send buffer + writeStall.await(); + long overall = 0; + byte[] array = new byte[1024]; + for (int n = 0; n != -1; n = is.read(array)) { + TimeUnit.MILLISECONDS.sleep(1); + overall += n; + } + return overall; + } + } + + private static void print(String format, Object... args) { + System.out.println(Thread.currentThread() + ": " + String.format(format, args)); + } + + private static byte[] byteArrayOfSize(int bound) { + return new byte[new Random().nextInt(1 + bound)]; + } +} From 66f56c70864ec2490018b411e541b30715d814da Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Wed, 10 May 2017 18:27:48 +0200 Subject: [PATCH 05/26] 8179867: JDK9 b167: demos exist in JDK bundles Reviewed-by: ihse --- jdk/make/CompileDemos.gmk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/jdk/make/CompileDemos.gmk b/jdk/make/CompileDemos.gmk index 336a2538e83..5b093935cd7 100644 --- a/jdk/make/CompileDemos.gmk +++ b/jdk/make/CompileDemos.gmk @@ -291,9 +291,21 @@ endif ################################################################################ +ifneq ($(filter images, $(MAKECMDGOALS)), ) + $(eval $(call SetupCopyFiles, COPY_TO_TEST_IMAGE, \ + SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \ + DEST := $(TEST_IMAGE_DIR)/jdk/demos, \ + FILES := $(call DoubleDollar, $(call CacheFind, $(SUPPORT_OUTPUTDIR)/demos/image)), \ + )) + + IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE) +endif + +################################################################################ # Hook to include the corresponding custom file, if present. $(eval $(call IncludeCustomExtension, jdk, CompileDemos.gmk)) all: $(TARGETS) +images: $(IMAGES_TARGETS) .PHONY: all From 56a26d4865914c474784bd4002b96247be7a2235 Mon Sep 17 00:00:00 2001 From: Stuart Marks Date: Wed, 10 May 2017 15:59:15 -0700 Subject: [PATCH 06/26] 8180128: small errors in String javadoc Reviewed-by: lancea --- jdk/src/java.base/share/classes/java/lang/String.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/lang/String.java b/jdk/src/java.base/share/classes/java/lang/String.java index 1bd125dae54..d28dcdd823a 100644 --- a/jdk/src/java.base/share/classes/java/lang/String.java +++ b/jdk/src/java.base/share/classes/java/lang/String.java @@ -335,7 +335,7 @@ public final class String * subarray. * *

    Each {@code byte} in the subarray is converted to a {@code char} as - * specified in the method above. + * specified in the {@link #String(byte[],int) String(byte[],int)} constructor. * * @deprecated This method does not properly convert bytes into characters. * As of JDK 1.1, the preferred way to do this is via the @@ -390,7 +390,7 @@ public final class String /** * Allocates a new {@code String} containing characters constructed from - * an array of 8-bit integer values. Each character cin the + * an array of 8-bit integer values. Each character c in the * resulting string is constructed from the corresponding component * b in the byte array such that: * From a83a070a03d906bccb8038a2ede79975673754bf Mon Sep 17 00:00:00 2001 From: Mark Sheppard Date: Thu, 11 May 2017 15:05:32 +0100 Subject: [PATCH 07/26] 7155591: test/java/net/MulticastSocket/SetOutgoingIf.java fails on macOS Reviewed-by: chegar, bpb --- .../net/MulticastSocket/SetOutgoingIf.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/jdk/test/java/net/MulticastSocket/SetOutgoingIf.java b/jdk/test/java/net/MulticastSocket/SetOutgoingIf.java index 1acfa16ef38..53cb28e5f2f 100644 --- a/jdk/test/java/net/MulticastSocket/SetOutgoingIf.java +++ b/jdk/test/java/net/MulticastSocket/SetOutgoingIf.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -40,6 +40,10 @@ public class SetOutgoingIf { return osname.contains("Windows"); } + static boolean isMacOS() { + return System.getProperty("os.name").contains("OS X"); + } + private static boolean hasIPv6() throws Exception { List nics = Collections.list( NetworkInterface.getNetworkInterfaces()); @@ -71,7 +75,7 @@ public class SetOutgoingIf { int index = 1; for (NetworkInterface nic : Collections.list(NetworkInterface.getNetworkInterfaces())) { // we should use only network interfaces with multicast support which are in "up" state - if (!nic.isLoopback() && nic.supportsMulticast() && nic.isUp()) { + if (!nic.isLoopback() && nic.supportsMulticast() && nic.isUp() && !isTestExcludedInterface(nic)) { NetIf netIf = NetIf.create(nic); // now determine what (if any) type of addresses are assigned to this interface @@ -91,6 +95,8 @@ public class SetOutgoingIf { netIfs.add(netIf); debug("Using: " + nic); } + } else { + System.out.println("Ignore NetworkInterface nic == " + nic); } } if (netIfs.size() <= 1) { @@ -170,6 +176,15 @@ public class SetOutgoingIf { } } + private static boolean isTestExcludedInterface(NetworkInterface nif) { + if (isMacOS() && nif.getName().contains("awdl")) + return true; + String dName = nif.getDisplayName(); + if (isWindows() && dName != null && dName.contains("Teredo")) + return true; + return false; + } + private static boolean debug = true; static void debug(String message) { From a5deccf8607e087a2554b5b54598ad415f48b379 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Thu, 11 May 2017 07:43:36 -0700 Subject: [PATCH 08/26] 8180085: (ch) java/nio/channels/SocketChannel/VectorIO.java: add debug instrumentation Add some print statements potentially useful in solving JDK-8177801. Reviewed-by: alanb --- .../java/nio/channels/SocketChannel/VectorIO.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/jdk/test/java/nio/channels/SocketChannel/VectorIO.java b/jdk/test/java/nio/channels/SocketChannel/VectorIO.java index 907d1b21716..8f585afb21a 100644 --- a/jdk/test/java/nio/channels/SocketChannel/VectorIO.java +++ b/jdk/test/java/nio/channels/SocketChannel/VectorIO.java @@ -87,8 +87,11 @@ public class VectorIO { while (rem > 0L) { long bytesWritten = sc.write(bufs); if (bytesWritten == 0) { - if (sc.isBlocking()) + if (sc.isBlocking()) { throw new RuntimeException("write did not block"); + } else { + System.err.println("Non-blocking write() wrote zero bytes"); + } Thread.sleep(50); } else { rem -= bytesWritten; @@ -140,8 +143,10 @@ public class VectorIO { for (;;) { sc = ssc.accept(); - if (sc != null) + if (sc != null) { + System.err.println("accept() succeeded"); break; + } Thread.sleep(50); } @@ -154,8 +159,12 @@ public class VectorIO { if (bytesRead < 0) break; if (bytesRead == 0) { - if (sc.isBlocking()) + if (sc.isBlocking()) { throw new RuntimeException("read did not block"); + } else { + System.err.println + ("Non-blocking read() read zero bytes"); + } Thread.sleep(50); } avail -= bytesRead; From 19a1a6c18987f1db190a2c93885d899dbde4f4d3 Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 11 May 2017 16:26:50 +0000 Subject: [PATCH 09/26] Added tag jdk-9+169 for changeset cd369ee4d4bc --- jdk/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/.hgtags b/jdk/.hgtags index 0789134cb17..f4217d62903 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -411,3 +411,4 @@ a7942c3b1e59495dbf51dc7c41aab355fcd253d7 jdk-9+165 5d2b48f1f0a322aca719b49ff02ab421705bffc7 jdk-9+166 7828aedcb525df40b7c8122bcc3f997c75ebaf7f jdk-9+167 e78da9db6299b3fcba49300d52e2359e82fdd218 jdk-9+168 +177436a54ca13730ffc725a6e5dbfcd9486f3da3 jdk-9+169 From b05e3d5acf5b367188f3b6aa92ec9c38f5dcda73 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Thu, 11 May 2017 10:48:00 -0700 Subject: [PATCH 10/26] 8179592: Update tables in java.base to be HTML 5-friendly Reviewed-by: mchung, darcy, martin --- .../share/classes/java/io/DataInput.java | 20 ++-- .../classes/java/io/RandomAccessFile.java | 9 +- .../java/io/SerializablePermission.java | 10 +- .../share/classes/java/lang/Character.java | 7 +- .../share/classes/java/lang/Class.java | 27 +++-- .../share/classes/java/lang/Double.java | 8 +- .../share/classes/java/lang/Float.java | 8 +- .../classes/java/lang/RuntimePermission.java | 9 +- .../share/classes/java/lang/String.java | 28 ++++- .../share/classes/java/lang/System.java | 14 ++- .../java/lang/invoke/LambdaMetafactory.java | 9 +- .../java/lang/invoke/MethodHandleInfo.java | 9 +- .../java/lang/invoke/MethodHandles.java | 7 +- .../java/lang/reflect/AnnotatedElement.java | 8 +- .../java/lang/reflect/ReflectPermission.java | 9 +- .../share/classes/java/math/BigDecimal.java | 8 +- .../share/classes/java/math/RoundingMode.java | 58 ++++++++-- .../share/classes/java/net/Inet4Address.java | 14 +-- .../share/classes/java/net/Inet6Address.java | 53 ++++----- .../share/classes/java/net/InetAddress.java | 7 +- .../share/classes/java/net/NetPermission.java | 9 +- .../java.base/share/classes/java/net/URI.java | 24 ++-- .../share/classes/java/net/URLConnection.java | 9 +- .../share/classes/java/net/URLPermission.java | 14 ++- .../channels/AsynchronousChannelGroup.java | 9 +- .../nio/channels/AsynchronousFileChannel.java | 9 +- .../AsynchronousServerSocketChannel.java | 9 +- .../channels/AsynchronousSocketChannel.java | 9 +- .../java/nio/channels/DatagramChannel.java | 9 +- .../java/nio/channels/FileChannel.java | 9 +- .../nio/channels/ServerSocketChannel.java | 9 +- .../java/nio/channels/SocketChannel.java | 9 +- .../classes/java/nio/charset/Charset.java | 9 +- .../classes/java/nio/file/FileSystem.java | 8 +- .../share/classes/java/nio/file/Files.java | 28 ++++- .../classes/java/nio/file/LinkPermission.java | 10 +- .../file/attribute/AclFileAttributeView.java | 9 +- .../attribute/BasicFileAttributeView.java | 9 +- .../file/attribute/DosFileAttributeView.java | 9 +- .../attribute/PosixFileAttributeView.java | 9 +- .../java/nio/file/spi/FileSystemProvider.java | 9 +- .../classes/java/security/DrbgParameters.java | 7 +- .../share/classes/java/security/Provider.java | 12 +- .../java/security/SecurityPermission.java | 16 ++- .../java/security/cert/X509Extension.java | 9 +- .../classes/java/text/DecimalFormat.java | 20 ++-- .../classes/java/text/MessageFormat.java | 14 ++- .../classes/java/text/SimpleDateFormat.java | 50 +++++---- .../java/time/chrono/HijrahChronology.java | 36 +++--- .../classes/java/time/chrono/IsoEra.java | 21 ++-- .../classes/java/time/chrono/MinguoEra.java | 23 ++-- .../java/time/chrono/ThaiBuddhistEra.java | 23 ++-- .../java/time/format/DateTimeFormatter.java | 51 ++++----- .../classes/java/time/temporal/IsoFields.java | 8 +- .../java/time/temporal/WeekFields.java | 14 ++- .../share/classes/java/util/Deque.java | 6 +- .../share/classes/java/util/Formatter.java | 106 +++++++++++++----- .../classes/java/util/GregorianCalendar.java | 97 ++++++++-------- .../share/classes/java/util/Locale.java | 75 +++++++------ .../share/classes/java/util/Queue.java | 2 +- .../classes/java/util/ResourceBundle.java | 13 ++- .../java/util/concurrent/BlockingDeque.java | 4 +- .../java/util/concurrent/BlockingQueue.java | 2 +- .../java/util/concurrent/ForkJoinPool.java | 2 +- .../classes/java/util/regex/Pattern.java | 48 +++++--- .../java/util/spi/CalendarNameProvider.java | 16 ++- .../java/util/stream/StreamOpFlag.java | 4 +- .../classes/javax/net/ssl/SSLPermission.java | 10 +- 68 files changed, 831 insertions(+), 408 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/io/DataInput.java b/jdk/src/java.base/share/classes/java/io/DataInput.java index acc7f996878..70f78a6a068 100644 --- a/jdk/src/java.base/share/classes/java/io/DataInput.java +++ b/jdk/src/java.base/share/classes/java/io/DataInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2017, 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 @@ -59,8 +59,9 @@ package java.io; * far left-hand column. * *

    - * + *
    + * + * * * * * - * + * * @@ -86,14 +87,14 @@ package java.io; * * * - * + * * * - * + * * * * - * + * * * - * + * * * - * + * * + * *
    Bit values and bytes
    * All characters in the range {@code '\u005Cu0001'} to @@ -71,7 +72,7 @@ package java.io; * Bit Values
    Byte 1Byte 10 * bits 6-0 *
    Bit Values
    Byte 1Byte 11 * 1 * 0 * bits 10-6 *
    Byte 2Byte 21 * 0 * bits 5-0 @@ -108,7 +109,7 @@ package java.io; * Bit Values
    Byte 1Byte 11 * 1 * 1 @@ -116,17 +117,18 @@ package java.io; * bits 15-12 *
    Byte 2Byte 21 * 0 * bits 11-6 *
    Byte 3Byte 31 * 0 * bits 5-0 *
    *
    *

    diff --git a/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java b/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java index 4fb409ec977..b2e08f8cb27 100644 --- a/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java +++ b/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2017, 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 @@ -136,8 +136,12 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * in which the file is to be opened. The permitted values and their * meanings are: * - * + *
    + * + * * + * + * * * + * *
    Access mode permitted values and meanings
    ValueMeaning
    {@code "r"} Open for reading only. Invoking any of the {@code write} * methods of the resulting object will cause an @@ -153,6 +157,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * Open for reading and writing, as with {@code "rw"}, and also * require that every update to the file's content be written * synchronously to the underlying storage device.
    * * The {@code "rws"} and {@code "rwd"} modes work much like the {@link diff --git a/jdk/src/java.base/share/classes/java/io/SerializablePermission.java b/jdk/src/java.base/share/classes/java/io/SerializablePermission.java index 8aded4dcad2..93034a165a4 100644 --- a/jdk/src/java.base/share/classes/java/io/SerializablePermission.java +++ b/jdk/src/java.base/share/classes/java/io/SerializablePermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -44,12 +44,16 @@ import java.util.StringTokenizer; * and for each provides a description of what the permission allows * and a discussion of the risks of granting code the permission. * - * + *
    + * + * * * * * * + * + * * * * @@ -79,7 +83,7 @@ import java.util.StringTokenizer; * * - * + * *
    Permission target name, what the permission allows, and associated risks
    Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
    enableSubclassImplementationCode could remove a configured filter and remove protections * already established.
    * * @see java.security.BasicPermission diff --git a/jdk/src/java.base/share/classes/java/lang/Character.java b/jdk/src/java.base/share/classes/java/lang/Character.java index 028190da55b..fd6682e6196 100644 --- a/jdk/src/java.base/share/classes/java/lang/Character.java +++ b/jdk/src/java.base/share/classes/java/lang/Character.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2017, 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 @@ -9566,7 +9566,9 @@ class Character implements java.io.Serializable, Comparable { * Determines if the specified character is ISO-LATIN-1 white space. * This method returns {@code true} for the following five * characters only: - * + *
    + * + * * * * @@ -9577,6 +9579,7 @@ class Character implements java.io.Serializable, Comparable { * * * + * *
    truechars
    {@code '\t'} {@code U+0009}{@code HORIZONTAL TABULATION}
    {@code '\n'} {@code U+000A}{@code CARRIAGE RETURN}
    {@code ' '} {@code U+0020}{@code SPACE}
    * * @param ch the character to be tested. diff --git a/jdk/src/java.base/share/classes/java/lang/Class.java b/jdk/src/java.base/share/classes/java/lang/Class.java index a7f1262c3b5..4251a6963b4 100644 --- a/jdk/src/java.base/share/classes/java/lang/Class.java +++ b/jdk/src/java.base/share/classes/java/lang/Class.java @@ -724,18 +724,23 @@ public final class Class implements java.io.Serializable, * one or more '{@code [}' characters representing the depth of the array * nesting. The encoding of element type names is as follows: * - *

    - * + *
    Element Type     Encoding - *
    boolean     Z - *
    byte     B - *
    char     C + *
    + * + * + * + * + * *
    Element types and encodings
    Element Type Encoding + *
    boolean Z + *
    byte B + *
    char C *
    class or interface - *     Lclassname; - *
    double     D - *
    float     F - *
    int     I - *
    long     J - *
    short     S + * Lclassname; + *
    double D + *
    float F + *
    int I + *
    long J + *
    short S + *
    * *

    The class or interface name classname is the binary name of diff --git a/jdk/src/java.base/share/classes/java/lang/Double.java b/jdk/src/java.base/share/classes/java/lang/Double.java index 75a227e5282..a7aa0a0f626 100644 --- a/jdk/src/java.base/share/classes/java/lang/Double.java +++ b/jdk/src/java.base/share/classes/java/lang/Double.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2017, 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 @@ -255,9 +255,12 @@ public final class Double extends Number implements Comparable { * * * - * + *
    * + * * + * + * * * * @@ -272,6 +275,7 @@ public final class Double extends Number implements Comparable { * * * + * *
    Examples
    Floating-point ValueHexadecimal String
    {@code 1.0} {@code 0x1.0p0}
    {@code -1.0} {@code -0x1.0p0}
    {@code 2.0} {@code 0x1.0p1}{@code 0x0.fffffffffffffp-1022}
    {@code Double.MIN_VALUE}{@code 0x0.0000000000001p-1022}
    * @param d the {@code double} to be converted. * @return a hex string representation of the argument. diff --git a/jdk/src/java.base/share/classes/java/lang/Float.java b/jdk/src/java.base/share/classes/java/lang/Float.java index 60e08db7ad5..77c1d1671d5 100644 --- a/jdk/src/java.base/share/classes/java/lang/Float.java +++ b/jdk/src/java.base/share/classes/java/lang/Float.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2017, 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 @@ -256,9 +256,12 @@ public final class Float extends Number implements Comparable { * * * - * + *
    * + * * + * + * * * * @@ -273,6 +276,7 @@ public final class Float extends Number implements Comparable { * * * + * *
    Examples
    Floating-point ValueHexadecimal String
    {@code 1.0} {@code 0x1.0p0}
    {@code -1.0} {@code -0x1.0p0}
    {@code 2.0} {@code 0x1.0p1}{@code 0x0.fffffep-126}
    {@code Float.MIN_VALUE}{@code 0x0.000002p-126}
    * @param f the {@code float} to be converted. * @return a hex string representation of the argument. diff --git a/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java b/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java index 489bcf64375..b1a4280498a 100644 --- a/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java +++ b/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java @@ -43,13 +43,17 @@ import java.lang.module.ModuleFinder; * target names, and for each provides a description of what the permission * allows and a discussion of the risks of granting code the permission. * - * + *
    + * + * * * * * * + * + * * * * @@ -383,6 +387,7 @@ import java.lang.module.ModuleFinder; * {@linkplain ModuleFinder#ofSystem system modules} in the runtime image. * * + * *
    permission target name, + * what the target allows, and associated risks
    Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
    createClassLoader
    * * @implNote diff --git a/jdk/src/java.base/share/classes/java/lang/String.java b/jdk/src/java.base/share/classes/java/lang/String.java index d28dcdd823a..ea94633597c 100644 --- a/jdk/src/java.base/share/classes/java/lang/String.java +++ b/jdk/src/java.base/share/classes/java/lang/String.java @@ -2203,12 +2203,16 @@ public final class String *

    The string {@code "boo:and:foo"}, for example, yields the * following results with these parameters: * - *

    + *
    + * + * * * * * * + * + * * * * @@ -2227,6 +2231,7 @@ public final class String * * * + * *
    Split example showing regex, limit, and result
    RegexLimitResult
    :2{@code { "boo", "and:foo" }}
    o0{@code { "b", "", ":and:f" }}
    * *

    An invocation of this method of the form @@ -2326,15 +2331,20 @@ public final class String *

    The string {@code "boo:and:foo"}, for example, yields the following * results with these expressions: * - *

    + *
    + * + * * * * * + * + * * * * * + * *
    Split examples showing regex and result
    RegexResult
    :{@code { "boo", "and", "foo" }}
    o{@code { "b", "", ":and:f" }}
    * * @@ -2445,13 +2455,17 @@ public final class String * {@code String} may be a different length than the original {@code String}. *

    * Examples of lowercase mappings are in the following table: - * + *
    + * + * * * * * * * + * + * * * * @@ -2480,6 +2494,7 @@ public final class String * sigma * * + * *
    Lowercase mapping examples showing language code of locale, upper case, lower case, and description
    Language Code of LocaleUpper CaseLower CaseDescription
    tr (Turkish)\u0130lowercased all chars in String
    * * @param locale use the case transformation rules for this locale @@ -2526,13 +2541,17 @@ public final class String *

    * Examples of locale-sensitive and 1:M case mappings are in the following table. * - * + *
    + * + * * * * * * * + * + * * * * @@ -2557,6 +2576,7 @@ public final class String * * * + * *
    Examples of locale-sensitive and 1:M case mappings. Shows Language code of locale, lower case, upper case, and description.
    Language Code of LocaleLower CaseUpper CaseDescription
    tr (Turkish)\u0069FAHRVERGNÜGEN
    * @param locale use the case transformation rules for this locale * @return the {@code String}, converted to uppercase. diff --git a/jdk/src/java.base/share/classes/java/lang/System.java b/jdk/src/java.base/share/classes/java/lang/System.java index 630380e2d4b..10664819e4f 100644 --- a/jdk/src/java.base/share/classes/java/lang/System.java +++ b/jdk/src/java.base/share/classes/java/lang/System.java @@ -575,9 +575,13 @@ public final class System { * system properties, a set of system properties is first created and * initialized. This set of system properties always includes values * for the following keys: - * + *
    + * + * * * + * + * * * @@ -636,6 +640,7 @@ public final class System { * * * + * *
    Shows property keys and associated values
    KeyDescription of Associated Value
    java.versionJava Runtime Environment version which may be interpreted * as a {@link Runtime.Version}
    User's home directory
    user.dirUser's current working directory
    *

    * Multiple paths in a system property value are separated by the path @@ -647,9 +652,13 @@ public final class System { * * @implNote In addition to the standard system properties, the system * properties may include the following keys: - * + *
    + * + * * * + * + * * * * @@ -658,6 +667,7 @@ public final class System { * * * + * *
    Shows property keys and associated values
    KeyDescription of Associated Value
    {@code jdk.module.path}The application module path
    {@code jdk.module.upgrade.path}The module name of the initial/main module
    {@code jdk.module.main.class}The main class name of the initial module
    * * @return the system properties diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java index 5f56dd6ab43..95719763b0f 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, 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 @@ -149,8 +149,12 @@ import java.util.Arrays; * capture argument (corresponding to the receiver) must be non-null. * *

    A type Q is considered adaptable to S as follows: - * + *
    + * + * * + * + * * * * @@ -176,6 +180,7 @@ import java.util.Arrays; *
    for return types: none * * + * *
    adaptable types
    QSLink-time checksInvocation-time checks
    PrimitivePrimitiveQ can be converted to S via a primitive widening conversionCast from Q to S
    * * @apiNote These linkage methods are designed to support the evaluation diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java index a53e0076756..909f271c672 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -81,8 +81,12 @@ import static java.lang.invoke.MethodHandleStatics.*; * The Lookup Factory Methods * correspond to all major use cases for methods, constructors, and fields. * These use cases may be distinguished using small integers as follows: - * + *
    + * + * * + * + * * * * @@ -119,6 +123,7 @@ import static java.lang.invoke.MethodHandleStatics.*; * * * + * *
    reference kinds
    reference kinddescriptive namescopememberbehavior
    {@code 1}{@code REF_getField}{@code class}{@code FT f;}{@code (T) this.f;}{@code 9}{@code REF_invokeInterface}{@code interface}{@code T m(A*);}{@code (T) this.m(arg*);}
    * @since 1.8 */ diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java index ae40f169ff2..292fd9bb6c4 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java @@ -278,12 +278,16 @@ public class MethodHandles { * (Bytecode behaviors are described in section 5.4.3.5 of the Java Virtual Machine Specification.) * Here is a summary of the correspondence between these factory methods and * the behavior of the resulting method handles: - * + *
    + * + * * * * * * + * + * * * * @@ -340,6 +344,7 @@ public class MethodHandles { * * * + * *
    lookup method behaviors
    lookup expressionmemberbytecode behavior
    {@link java.lang.invoke.MethodHandles.Lookup#findGetter lookup.findGetter(C.class,"f",FT.class)}{@code FT f;}{@code (T) this.f;}{@link java.lang.invoke.MethodHandles.Lookup#findClass lookup.findClass("C")}{@code class C { ... }}{@code C.class;}
    * * Here, the type {@code C} is the class or interface being searched for a member, diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java b/jdk/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java index 3bc54c2856a..fd15669931b 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, 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 @@ -105,10 +105,13 @@ import sun.reflect.annotation.AnnotationType; *

    The table below summarizes which kind of annotation presence * different methods in this interface examine. * - * + *
    * + * * * + * + * * * @@ -127,6 +130,7 @@ import sun.reflect.annotation.AnnotationType; * * + * *
    Overview of kind of presence detected by different AnnotatedElement methods
    Kind of Presence
    MethodDirectly PresentIndirectly PresentPresentAssociated
    {@code T}{@link #getAnnotation(Class) getAnnotation(Class<T>)} * X
    {@code T[]}{@link #getDeclaredAnnotationsByType(Class) getDeclaredAnnotationsByType(Class<T>)} * XX
    * *

    For an invocation of {@code get[Declared]AnnotationsByType( Class < diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java b/jdk/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java index df6178358df..8b34ae3b4f2 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -32,12 +32,16 @@ package java.lang.reflect; * provides a summary description of what the permission allows, * and discusses the risks of granting code the permission. * - * + *
    + * + * * * * * * + * + * * * * @@ -58,6 +62,7 @@ package java.lang.reflect; * help in its attempt to compromise security in the system. * * + * *
    Table shows permission target name, what the permission allows, and associated risks
    Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
    suppressAccessChecks
    * * @see java.security.Permission diff --git a/jdk/src/java.base/share/classes/java/math/BigDecimal.java b/jdk/src/java.base/share/classes/java/math/BigDecimal.java index 5feb70fec43..f0b40ffed96 100644 --- a/jdk/src/java.base/share/classes/java/math/BigDecimal.java +++ b/jdk/src/java.base/share/classes/java/math/BigDecimal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2017, 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 @@ -120,15 +120,19 @@ import java.util.Arrays; * preferred scale for representing a result. The preferred * scale for each operation is listed in the table below. * - * + *
    * + * * + * + * * * * * * + * *
    Preferred Scales for Results of Arithmetic Operations *
    OperationPreferred Scale of Result
    Addmax(addend.scale(), augend.scale())
    Subtractmax(minuend.scale(), subtrahend.scale())
    Multiplymultiplier.scale() + multiplicand.scale()
    Dividedividend.scale() - divisor.scale()
    Square rootradicand.scale()/2
    * * These scales are the ones used by the methods which return exact diff --git a/jdk/src/java.base/share/classes/java/math/RoundingMode.java b/jdk/src/java.base/share/classes/java/math/RoundingMode.java index 042d4f5f177..79ecce36e7f 100644 --- a/jdk/src/java.base/share/classes/java/math/RoundingMode.java +++ b/jdk/src/java.base/share/classes/java/math/RoundingMode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, 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 @@ -51,8 +51,9 @@ package java.math; * proper {@code MathContext}. A summary table showing the results * of these rounding operations for all rounding modes appears below. * - * + *
    * + * * * @@ -64,6 +65,8 @@ package java.math; * * * + * + * * * * @@ -75,7 +78,8 @@ package java.math; * * * - *
    Summary of Rounding Operations Under Different Rounding Modes
    Result of rounding input to one digit with the given * rounding mode
    {@code HALF_DOWN}{@code HALF_EVEN}{@code UNNECESSARY}
    5.5 6 5 6 5 6 5 6 throw {@code ArithmeticException}
    2.5 3 2 3 2 3 2 2 throw {@code ArithmeticException}
    -1.6 -2 -1 -1 -2 -2 -2 -2 throw {@code ArithmeticException}
    -2.5 -3 -2 -2 -3 -3 -2 -2 throw {@code ArithmeticException}
    -5.5 -6 -5 -5 -6 -6 -5 -6 throw {@code ArithmeticException}
    + *

    * * *

    This {@code enum} is intended to replace the integer-based @@ -100,10 +104,13 @@ public enum RoundingMode { * value. * *

    Example: - * + *
    * + * * * + * * * * @@ -114,6 +121,7 @@ public enum RoundingMode { * * * + * *
    Rounding mode UP Examples
    Input NumberInput rounded to one digit
    with {@code UP} rounding + *
    5.5 6
    2.5 3
    1.6 2
    -1.6 -2
    -2.5 -3
    -5.5 -6
    */ UP(BigDecimal.ROUND_UP), @@ -124,10 +132,13 @@ public enum RoundingMode { * rounding mode never increases the magnitude of the calculated value. * *

    Example: - * + *
    * + * * * + * * * * @@ -138,6 +149,7 @@ public enum RoundingMode { * * * + * *
    Rounding mode DOWN Examples
    Input NumberInput rounded to one digit
    with {@code DOWN} rounding + *
    5.5 5
    2.5 2
    1.6 1
    -1.6 -1
    -2.5 -2
    -5.5 -5
    */ DOWN(BigDecimal.ROUND_DOWN), @@ -149,10 +161,13 @@ public enum RoundingMode { * that this rounding mode never decreases the calculated value. * *

    Example: - * + *
    * + * * * + * * * * @@ -163,6 +178,7 @@ public enum RoundingMode { * * * + * *
    Rounding mode CEILING Examples
    Input NumberInput rounded to one digit
    with {@code CEILING} rounding + *
    5.5 6
    2.5 3
    1.6 2
    -1.6 -1
    -2.5 -2
    -5.5 -5
    */ CEILING(BigDecimal.ROUND_CEILING), @@ -174,10 +190,13 @@ public enum RoundingMode { * this rounding mode never increases the calculated value. * *

    Example: - * + *
    * + * * * + * * * * @@ -188,6 +207,7 @@ public enum RoundingMode { * * * + * *
    Rounding mode FLOOR Examples
    Input NumberInput rounded to one digit
    with {@code FLOOR} rounding + *
    5.5 5
    2.5 2
    1.6 1
    -1.6 -2
    -2.5 -3
    -5.5 -6
    */ FLOOR(BigDecimal.ROUND_FLOOR), @@ -201,10 +221,13 @@ public enum RoundingMode { * mode commonly taught at school. * *

    Example: - * + *
    * + * * * + * * * * @@ -215,6 +238,7 @@ public enum RoundingMode { * * * + * *
    Rounding mode HALF_UP Examples
    Input NumberInput rounded to one digit
    with {@code HALF_UP} rounding + *
    5.5 6
    2.5 3
    1.6 2
    -1.6 -2
    -2.5 -3
    -5.5 -6
    */ HALF_UP(BigDecimal.ROUND_HALF_UP), @@ -227,10 +251,13 @@ public enum RoundingMode { * {@code RoundingMode.DOWN}. * *

    Example: - * + *
    * + * * * + * * * * @@ -241,6 +268,7 @@ public enum RoundingMode { * * * + * *
    Rounding mode HALF_DOWN Examples
    Input NumberInput rounded to one digit
    with {@code HALF_DOWN} rounding + *
    5.5 5
    2.5 2
    1.6 2
    -1.6 -2
    -2.5 -2
    -5.5 -5
    */ HALF_DOWN(BigDecimal.ROUND_HALF_DOWN), @@ -260,10 +288,13 @@ public enum RoundingMode { * arithmetic in Java. * *

    Example: - * + *
    * + * * * + * * * * @@ -274,6 +305,7 @@ public enum RoundingMode { * * * + * *
    Rounding mode HALF_EVEN Examples
    Input NumberInput rounded to one digit
    with {@code HALF_EVEN} rounding + *
    5.5 6
    2.5 2
    1.6 2
    -1.6 -2
    -2.5 -2
    -5.5 -6
    */ HALF_EVEN(BigDecimal.ROUND_HALF_EVEN), @@ -284,10 +316,13 @@ public enum RoundingMode { * specified on an operation that yields an inexact result, an * {@code ArithmeticException} is thrown. *

    Example: - * + *
    * + * * * + * * * * @@ -298,6 +333,7 @@ public enum RoundingMode { * * * + * *
    Rounding mode UNNECESSARY Examples
    Input NumberInput rounded to one digit
    with {@code UNNECESSARY} rounding + *
    5.5 throw {@code ArithmeticException}
    2.5 throw {@code ArithmeticException}
    1.6 throw {@code ArithmeticException}
    -1.6 throw {@code ArithmeticException}
    -2.5 throw {@code ArithmeticException}
    -5.5 throw {@code ArithmeticException}
    */ UNNECESSARY(BigDecimal.ROUND_UNNECESSARY); diff --git a/jdk/src/java.base/share/classes/java/net/Inet4Address.java b/jdk/src/java.base/share/classes/java/net/Inet4Address.java index 1efd9fca038..25c5ab41224 100644 --- a/jdk/src/java.base/share/classes/java/net/Inet4Address.java +++ b/jdk/src/java.base/share/classes/java/net/Inet4Address.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -41,12 +41,12 @@ import java.io.ObjectStreamException; * Textual representation of IPv4 address used as input to methods * takes one of the following forms: * - *

    - * - * - * - * - *
    {@code d.d.d.d}
    {@code d.d.d}
    {@code d.d}
    {@code d}
    + *
      + *
    • {@code d.d.d.d}
    • + *
    • {@code d.d.d}
    • + *
    • {@code d.d}
    • + *
    • {@code d}
    • + *
    * *

    When four parts are specified, each is interpreted as a byte of * data and assigned, from left to right, to the four bytes of an IPv4 diff --git a/jdk/src/java.base/share/classes/java/net/Inet6Address.java b/jdk/src/java.base/share/classes/java/net/Inet6Address.java index a6ebe99127d..0df84877cd5 100644 --- a/jdk/src/java.base/share/classes/java/net/Inet6Address.java +++ b/jdk/src/java.base/share/classes/java/net/Inet6Address.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -49,9 +49,9 @@ import java.util.Arrays; * the hexadecimal values of the eight 16-bit pieces of the * address. This is the full form. For example, * - *

    - * - *
    {@code 1080:0:0:0:8:800:200C:417A}
    + *
      + *
    • {@code 1080:0:0:0:8:800:200C:417A}
    • + *
    * *

    Note that it is not necessary to write the leading zeros in * an individual field. However, there must be at least one numeral @@ -66,9 +66,9 @@ import java.util.Arrays; * The "::" can also be used to compress the leading and/or trailing * zeros in an address. For example, * - *

    - * - *
    {@code 1080::8:800:200C:417A}
    + *
      + *
    • {@code 1080::8:800:200C:417A}
    • + *
    * *
  • An alternative form that is sometimes more convenient * when dealing with a mixed environment of IPv4 and IPv6 nodes is @@ -77,35 +77,35 @@ import java.util.Arrays; * are the decimal values of the four low-order 8-bit pieces of the * standard IPv4 representation address, for example, * - *

    - * - * - *
    {@code ::FFFF:129.144.52.38}
    {@code ::129.144.52.38}
    + *
      + *
    • {@code ::FFFF:129.144.52.38}
    • + *
    • {@code ::129.144.52.38}
    • + *
    * *

    where "::FFFF:d.d.d.d" and "::d.d.d.d" are, respectively, the * general forms of an IPv4-mapped IPv6 address and an * IPv4-compatible IPv6 address. Note that the IPv4 portion must be * in the "d.d.d.d" form. The following forms are invalid: * - *

    - * - * - * - * - *
    {@code ::FFFF:d.d.d}
    {@code ::FFFF:d.d}
    {@code ::d.d.d}
    {@code ::d.d}
    + *
      + *
    • {@code ::FFFF:d.d.d}
    • + *
    • {@code ::FFFF:d.d}
    • + *
    • {@code ::d.d.d}
    • + *
    • {@code ::d.d}
    • + *
    * *

    The following form: * - *

    - * - *
    {@code ::FFFF:d}
    + *
      + *
    • {@code ::FFFF:d}
    • + *
    * *

    is valid, however it is an unconventional representation of * the IPv4-compatible IPv6 address, * - *

    - * - *
    {@code ::255.255.0.d}
    + *
      + *
    • {@code ::255.255.0.d}
    • + *
    * *

    while "::d" corresponds to the general IPv6 address * "0:0:0:0:0:0:0:d".

  • @@ -119,9 +119,10 @@ import java.util.Arrays; *

    Special IPv6 address

    * *
    - * - * - *
    IPv4-mapped addressOf the form::ffff:w.x.y.z, this IPv6 address is used to + * + * + * + *
    Description of IPv4-mapped address
    IPv4-mapped addressOf the form ::ffff:w.x.y.z, this IPv6 address is used to * represent an IPv4 address. It allows the native program to * use the same address data structure and also the same * socket when communicating with both IPv4 and IPv6 nodes. diff --git a/jdk/src/java.base/share/classes/java/net/InetAddress.java b/jdk/src/java.base/share/classes/java/net/InetAddress.java index 84457f30066..22d9ce80303 100644 --- a/jdk/src/java.base/share/classes/java/net/InetAddress.java +++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2017, 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 @@ -72,7 +72,9 @@ import sun.net.util.IPAddressUtil; * *

    Address types

    * - *
    + *
    + * + * * * + * *
    Description of unicast and multicast address types
    unicastAn identifier for a single interface. A packet sent to * a unicast address is delivered to the interface identified by @@ -96,6 +98,7 @@ import sun.net.util.IPAddressUtil; * An identifier for a set of interfaces (typically belonging * to different nodes). A packet sent to a multicast address is * delivered to all interfaces identified by that address.
    * *

    IP address scope

    diff --git a/jdk/src/java.base/share/classes/java/net/NetPermission.java b/jdk/src/java.base/share/classes/java/net/NetPermission.java index dad3fb99f32..f156fb7af50 100644 --- a/jdk/src/java.base/share/classes/java/net/NetPermission.java +++ b/jdk/src/java.base/share/classes/java/net/NetPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -47,12 +47,16 @@ import java.util.StringTokenizer; * and for each provides a description of what the permission allows * and a discussion of the risks of granting code the permission. * - * + *
    + * + * * * * * * + * + * * * * @@ -151,6 +155,7 @@ import java.util.StringTokenizer; * creating a ProtectionDomain/CodeSource for a class even though * that class really didn't come from that location. * + *
    Permission target name, what the permission allows, and associated risks
    Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
    allowHttpTraceThe ability to use the HTTP TRACE method in HttpURLConnection.
    * * @see java.security.BasicPermission diff --git a/jdk/src/java.base/share/classes/java/net/URI.java b/jdk/src/java.base/share/classes/java/net/URI.java index 3bf4895c1e5..48c224798a0 100644 --- a/jdk/src/java.base/share/classes/java/net/URI.java +++ b/jdk/src/java.base/share/classes/java/net/URI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -83,11 +83,11 @@ import java.lang.NullPointerException; // for javadoc * not begin with a slash character ({@code '/'}). Opaque URIs are not * subject to further parsing. Some examples of opaque URIs are: * - *
    - * - * - * - *
    {@code mailto:java-net@java.sun.com}
    {@code news:comp.lang.java}
    {@code urn:isbn:096139210x}
    + *
      + *
    • {@code mailto:java-net@java.sun.com}
    • + *
    • {@code news:comp.lang.java}
    • + *
    • {@code urn:isbn:096139210x}
    • + *
    * *

    A hierarchical URI is either an absolute URI whose * scheme-specific part begins with a slash character, or a relative URI, that @@ -132,8 +132,12 @@ import java.lang.NullPointerException; // for javadoc * *

    All told, then, a URI instance has the following nine components: * - *

    + *
    + * + * * + * + * * * * @@ -143,6 +147,7 @@ import java.lang.NullPointerException; // for javadoc * * * + * *
    Describes the components of a URI:scheme,scheme-specific-part,authority,user-info,host,port,path,query,fragment
    ComponentType
    scheme{@code String}
    scheme-specific-part    {@code String}
    authority{@code String}
    path{@code String}
    query{@code String}
    fragment{@code String}
    * * In a given instance any particular component is either undefined or @@ -248,7 +253,9 @@ import java.lang.NullPointerException; // for javadoc * which are taken from that specification, are used below to describe these * constraints: * - *
    + *
    + * + * * * + * *
    Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other
    alphaThe US-ASCII alphabetic characters, * {@code 'A'} through {@code 'Z'} @@ -279,6 +286,7 @@ import java.lang.NullPointerException; // for javadoc * java.lang.Character#isSpaceChar(char) Character.isSpaceChar} * method)  (Deviation from RFC 2396, which is * limited to US-ASCII)
    * *

    The set of all legal URI characters consists of diff --git a/jdk/src/java.base/share/classes/java/net/URLConnection.java b/jdk/src/java.base/share/classes/java/net/URLConnection.java index e88c2f5f40c..c9331b704af 100644 --- a/jdk/src/java.base/share/classes/java/net/URLConnection.java +++ b/jdk/src/java.base/share/classes/java/net/URLConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2017, 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 @@ -54,13 +54,18 @@ import sun.security.action.GetPropertyAction; * read from and to write to the resource referenced by the URL. In * general, creating a connection to a URL is a multistep process: * - *

    + *
    + * + * * * + * + * * * + * *
    Describes the process of creating a connection to a URL: openConnection() and connect() over time.
    {@code openConnection()}{@code connect()}
    Manipulate parameters that affect the connection to the remote * resource.Interact with the resource; query header fields and * contents.
    * ----------------------------> *
    time
    diff --git a/jdk/src/java.base/share/classes/java/net/URLPermission.java b/jdk/src/java.base/share/classes/java/net/URLPermission.java index e78c7aee68c..43a8bd43066 100644 --- a/jdk/src/java.base/share/classes/java/net/URLPermission.java +++ b/jdk/src/java.base/share/classes/java/net/URLPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, 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 @@ -72,9 +72,12 @@ import java.security.Permission; * separated by '/' characters. path may also be empty. The path is specified * in a similar way to the path in {@link java.io.FilePermission}. There are * three different ways as the following examples show: - * + *
    * + * * + * + * * * * @@ -90,6 +93,7 @@ import java.security.Permission; * example). * * + * *
    URL Examples
    Example urlDescription
    http://www.oracle.com/a/b/c.htmlA url which identifies a specific (single) resource
    *

    * The '*' and '-' may only be specified in the final segment of a path and must be @@ -246,9 +250,12 @@ public final class URLPermission extends Permission { *

  • otherwise, return false
  • * *

    Some examples of how paths are matched are shown below: - * + *
    * + * * + * + * * * * @@ -256,6 +263,7 @@ public final class URLPermission extends Permission { * * * + * *
    Examples of Path Matching
    this's pathp's pathmatch
    /a/b/a/byes
    /a/b/*/a/b/cyes
    /a/b/*/a/b/c/dno
    /a/b/-/a/b/c/d/eyes
    /a/b/-/a/b/c/*yes
    /a/b/*/a/b/c/-no
    */ public boolean implies(Permission p) { diff --git a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousChannelGroup.java b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousChannelGroup.java index d7bb619bd21..acd7da8b1d9 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousChannelGroup.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousChannelGroup.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -60,11 +60,15 @@ import java.util.concurrent.TimeUnit; * default group is not configured then the pooled threads of the default group * are {@link Thread#isDaemon daemon} threads. * - * + *
    + * + * * * * * + * + * * * * * + * *
    System properties
    System propertyDescription
    {@code java.nio.channels.DefaultThreadPool.threadFactory} The value of this property is taken to be the fully-qualified name @@ -86,6 +90,7 @@ import java.util.concurrent.TimeUnit; * unspecified error to be thrown during the construction of the default * group.
    * *

    Threading

    diff --git a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java index 4b5548e79e5..9653a433050 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -133,8 +133,12 @@ public abstract class AsynchronousFileChannel *

    In addition to {@code READ} and {@code WRITE}, the following options * may be present: * - * + *
    + * + * * + * + * * * * * + * *
    additional options
    Option Description
    {@link StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING} When opening an existing file, the file is first truncated to a @@ -186,6 +190,7 @@ public abstract class AsynchronousFileChannel * href="../file/package-summary.html#integrity"> Synchronized I/O file * integrity).
    * *

    An implementation may also support additional options. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java index 44a2460426f..137451c7763 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -52,11 +52,15 @@ import java.io.IOException; *

    Socket options are configured using the {@link #setOption(SocketOption,Object) * setOption} method. Channels of this type support the following options: *

    - * + *
    + * + * * * * * + * + * * * * @@ -65,6 +69,7 @@ import java.io.IOException; * * * + * *
    Socket options
    Option NameDescription
    {@link java.net.StandardSocketOptions#SO_RCVBUF SO_RCVBUF} The size of the socket receive buffer {@link java.net.StandardSocketOptions#SO_REUSEADDR SO_REUSEADDR} Re-use address
    *
    * Additional (implementation specific) options may also be supported. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java index d5e2abeb63a..6ba16628632 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -62,11 +62,15 @@ import java.nio.ByteBuffer; *

    Socket options are configured using the {@link #setOption(SocketOption,Object) * setOption} method. Asynchronous socket channels support the following options: *

    - * + *
    + * + * * * * * + * + * * * * @@ -87,6 +91,7 @@ import java.nio.ByteBuffer; * * * + * *
    Socket options
    Option NameDescription
    {@link java.net.StandardSocketOptions#SO_SNDBUF SO_SNDBUF} The size of the socket send buffer {@link java.net.StandardSocketOptions#TCP_NODELAY TCP_NODELAY} Disable the Nagle algorithm
    *
    * Additional (implementation specific) options may also be supported. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java index 0b3278bf356..ac96bc61596 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -57,11 +57,15 @@ import java.nio.channels.spi.SelectorProvider; * setOption} method. A datagram channel to an Internet Protocol socket supports * the following options: *
    - * + *
    + * + * * * * * + * + * * * * @@ -97,6 +101,7 @@ import java.nio.channels.spi.SelectorProvider; * IP_MULTICAST_LOOP} * * + * *
    Socket options
    Option NameDescription
    {@link java.net.StandardSocketOptions#SO_SNDBUF SO_SNDBUF} The size of the socket send buffer Loopback for Internet Protocol (IP) multicast datagrams
    *
    * Additional (implementation specific) options may also be supported. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java index d4fb4564259..551ef21bb2c 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -174,8 +174,12 @@ public abstract class FileChannel *

    In the addition to {@code READ} and {@code WRITE}, the following * options may be present: * - * + *
    + * + * * + * + * * * * * + * *
    additional options
    Option Description
    {@link StandardOpenOption#APPEND APPEND} If this option is present then the file is opened for writing and @@ -237,6 +241,7 @@ public abstract class FileChannel * href="../file/package-summary.html#integrity"> Synchronized I/O file * integrity).
    * *

    An implementation may also support additional options. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java index 7c9666bbdd8..ea8951b2d2e 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -46,11 +46,15 @@ import java.nio.channels.spi.SelectorProvider; *

    Socket options are configured using the {@link #setOption(SocketOption,Object) * setOption} method. Server-socket channels support the following options: *

    - * + *
    + * + * * * * * + * + * * * * @@ -59,6 +63,7 @@ import java.nio.channels.spi.SelectorProvider; * * * + * *
    Socket options
    Option NameDescription
    {@link java.net.StandardSocketOptions#SO_RCVBUF SO_RCVBUF} The size of the socket receive buffer {@link java.net.StandardSocketOptions#SO_REUSEADDR SO_REUSEADDR} Re-use address
    *
    * Additional (implementation specific) options may also be supported. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java index c25cc68edf2..0025d2c22cf 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -66,11 +66,15 @@ import java.nio.channels.spi.SelectorProvider; *

    Socket options are configured using the {@link #setOption(SocketOption,Object) * setOption} method. Socket channels support the following options: *

    - * + *
    + * + * * * * * + * + * * * * @@ -96,6 +100,7 @@ import java.nio.channels.spi.SelectorProvider; * * * + * *
    Socket options
    Option NameDescription
    {@link java.net.StandardSocketOptions#SO_SNDBUF SO_SNDBUF} The size of the socket send buffer {@link java.net.StandardSocketOptions#TCP_NODELAY TCP_NODELAY} Disable the Nagle algorithm
    *
    * Additional (implementation specific) options may also be supported. diff --git a/jdk/src/java.base/share/classes/java/nio/charset/Charset.java b/jdk/src/java.base/share/classes/java/nio/charset/Charset.java index a9a8b91e692..480ede3e6a2 100644 --- a/jdk/src/java.base/share/classes/java/nio/charset/Charset.java +++ b/jdk/src/java.base/share/classes/java/nio/charset/Charset.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -147,8 +147,12 @@ import sun.security.action.GetPropertyAction; * implementation to see if any other charsets are supported. The behavior * of such optional charsets may differ between implementations. * - *
    + *
    + * + * * + * + * * * @@ -165,6 +169,7 @@ import sun.security.action.GetPropertyAction; * * + * *
    Description of standard charsets
    CharsetDescription
    {@code US-ASCII}Seven-bit ASCII, a.k.a. {@code ISO646-US}, * a.k.a. the Basic Latin block of the Unicode character set
    {@code UTF-16}Sixteen-bit UCS Transformation Format, * byte order identified by an optional byte-order mark
    * *

    The {@code UTF-8} charset is specified by - * + *
    + * + * * * * @@ -348,7 +350,7 @@ public abstract class FileSystem * platform (note that the backslash is escaped; as a string literal in the * Java Language the pattern would be "C:\\\\*") * - * + * *
    Pattern Language
    {@code *.java}Matches a path that represents a file name ending in {@code .java}
    * * diff --git a/jdk/src/java.base/share/classes/java/nio/file/Files.java b/jdk/src/java.base/share/classes/java/nio/file/Files.java index 3a6491440a7..ac662e4e431 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/Files.java +++ b/jdk/src/java.base/share/classes/java/nio/file/Files.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -233,8 +233,12 @@ public final class Files { *

    In the addition to {@code READ} and {@code WRITE}, the following * options may be present: * - * + *
    + * + * * + * + * * * * * + * *
    Options
    Option Description
    {@link StandardOpenOption#APPEND APPEND} If this option is present then the file is opened for writing and @@ -294,6 +298,7 @@ public final class Files { * href="package-summary.html#integrity"> Synchronized I/O file * integrity).
    * *

    An implementation may also support additional implementation specific @@ -1188,8 +1193,12 @@ public final class Files { * *

    The {@code options} parameter may include any of the following: * - * + *
    + * + * * + * + * * * * * + * *
    Options
    Option Description
    {@link StandardCopyOption#REPLACE_EXISTING REPLACE_EXISTING} If the target file exists, then the target file is replaced if it @@ -1215,6 +1224,7 @@ public final class Files { * new link. In other words, the {@code COPY_ATTRIBUTES} option may be * ignored when copying a symbolic link.
    * *

    An implementation of this interface may support additional @@ -1306,8 +1316,12 @@ public final class Files { * *

    The {@code options} parameter may include any of the following: * - * + *
    + * + * * + * + * * * * + * *
    Options
    Option Description
    {@link StandardCopyOption#REPLACE_EXISTING REPLACE_EXISTING} If the target file exists, then the target file is replaced if it @@ -1326,6 +1340,7 @@ public final class Files { * example, when the target location is on a different {@code FileStore} * and would require that the file be copied, or target location is * associated with a different provider to this object.
    * *

    An implementation of this interface may support additional @@ -1909,7 +1924,9 @@ public final class Files { * attributes} parameter: * *

    - * + *
    + * + * * * * @@ -1927,6 +1944,7 @@ public final class Files { * * * + * *
    Possible values
    {@code "*"} Read all {@link BasicFileAttributes basic-file-attributes}. {@code "posix:permissions,owner,size"} Reads the POSIX file permissions, owner, and file size.
    *
    * diff --git a/jdk/src/java.base/share/classes/java/nio/file/LinkPermission.java b/jdk/src/java.base/share/classes/java/nio/file/LinkPermission.java index bf54e168774..8f82d9f2adb 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/LinkPermission.java +++ b/jdk/src/java.base/share/classes/java/nio/file/LinkPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -33,13 +33,16 @@ import java.security.BasicPermission; *

    The following table provides a summary description of what the permission * allows, and discusses the risks of granting code the permission. * - * + *
    + * + * * * * * * + * + * * * * * + * *
    Table shows permission target name, what the permission allows, and associated risks
    Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
    hard Ability to add an existing file to a directory. This is sometimes @@ -55,6 +58,7 @@ import java.security.BasicPermission; * linking to any file or directory in the file system thus allowing the * attacker to access to all files.
    * * @since 1.7 diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java index 429bfde8a1b..4ba76741dd0 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -94,11 +94,15 @@ import java.io.IOException; *

    Where dynamic access to file attributes is required, the attributes * supported by this attribute view are as follows: *

    - * + *
    + * + * * * * * + * + * * * * @@ -107,6 +111,7 @@ import java.io.IOException; * * * + * *
    Supported attributes
    Name Type
    "acl" {@link List}<{@link AclEntry}> "owner" {@link UserPrincipal}
    *
    * diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/BasicFileAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/BasicFileAttributeView.java index bfa3fdc2676..465fb6bc3f3 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/BasicFileAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/BasicFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -41,11 +41,15 @@ import java.io.IOException; *

    Where dynamic access to file attributes is required, the attributes * supported by this attribute view have the following names and types: *

    - * + *
    + * + * * * * * + * + * * * * @@ -82,6 +86,7 @@ import java.io.IOException; * * * + * *
    Supported attributes
    Name Type
    "lastModifiedTime" {@link FileTime} "fileKey" {@link Object}
    *
    * diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/DosFileAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/DosFileAttributeView.java index c12d8a0e5f0..be4f570b46b 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/DosFileAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/DosFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -41,11 +41,15 @@ import java.io.IOException; * BasicFileAttributeView}, and in addition, the following attributes are * supported: *
    - * + *
    + * + * * * * * + * + * * * * @@ -62,6 +66,7 @@ import java.io.IOException; * * * + * *
    Supported attributes
    Name Type
    readonly {@link Boolean} archive {@link Boolean}
    *
    * diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java index f8c36523d66..9e171768603 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,11 +74,15 @@ import java.io.IOException; * BasicFileAttributeView} and {@link FileOwnerAttributeView}, and in addition, * the following attributes are supported: *
    - * + *
    + * + * * * * * + * + * * * * @@ -87,6 +91,7 @@ import java.io.IOException; * * * + * *
    Supported attributes
    Name Type
    "permissions" {@link Set}<{@link PosixFilePermission}> "group" {@link GroupPrincipal}
    *
    * diff --git a/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java b/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java index b92cf525eef..26dc40606de 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java +++ b/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -919,8 +919,12 @@ public abstract class FileSystemProvider { * according to all of access modes specified in the {@code modes} parameter * as follows: * - * + *
    + * + * * + * + * * * * * + * *
    Access Modes
    Value Description
    {@link AccessMode#READ READ} Checks that the file exists and that the Java virtual machine has @@ -940,6 +944,7 @@ public abstract class FileSystemProvider { * virtual machine has permission to search the directory in order to * access file or subdirectories.
    * *

    If the {@code modes} parameter is of length zero, then the existence diff --git a/jdk/src/java.base/share/classes/java/security/DrbgParameters.java b/jdk/src/java.base/share/classes/java/security/DrbgParameters.java index 4767861e3ad..05723baa916 100644 --- a/jdk/src/java.base/share/classes/java/security/DrbgParameters.java +++ b/jdk/src/java.base/share/classes/java/security/DrbgParameters.java @@ -263,14 +263,19 @@ public class DrbgParameters { * Capability effective = ((DrbgParametes.Initiate) s.getParameters()) * .getCapability(); * - * + *
    + * + * * * * * + * + * * * * + * *
    requested and effective capabilities
    Requested ValuePossible Effective Values
    NONENONE, RESEED_ONLY, PR_AND_RESEED
    RESEED_ONLYRESEED_ONLY, PR_AND_RESEED
    PR_AND_RESEEDPR_AND_RESEED
    *

    * A DRBG implementation supporting prediction resistance must also diff --git a/jdk/src/java.base/share/classes/java/security/Provider.java b/jdk/src/java.base/share/classes/java/security/Provider.java index f53660346a5..cc5313e2a19 100644 --- a/jdk/src/java.base/share/classes/java/security/Provider.java +++ b/jdk/src/java.base/share/classes/java/security/Provider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -61,17 +61,21 @@ import java.util.function.Function; * security framework. Services of this type cannot be added, removed, * or modified by applications. * The following attributes are automatically placed in each Provider object: - * + *
    * + * * + * + * * - * + * * * * - + * * * + * *
    Attributes Automatically Placed in a Provider Object
    NameValue
    {@code Provider.id name}{@code String.valueOf(provider.getName())}{@code String.valueOf(provider.getName())}
    {@code Provider.id version}{@code String.valueOf(provider.getVersionStr())}
    {@code Provider.id info}{@code String.valueOf(provider.getInfo())}{@code String.valueOf(provider.getInfo())}
    {@code Provider.id className}{@code provider.getClass().getName()}
    * *

    Each provider has a name and a version string. A provider normally diff --git a/jdk/src/java.base/share/classes/java/security/SecurityPermission.java b/jdk/src/java.base/share/classes/java/security/SecurityPermission.java index 8234624d26e..e0d25c9689f 100644 --- a/jdk/src/java.base/share/classes/java/security/SecurityPermission.java +++ b/jdk/src/java.base/share/classes/java/security/SecurityPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,12 +45,16 @@ import java.util.StringTokenizer; * target names, and for each provides a description of what the permission * allows and a discussion of the risks of granting code the permission. * - * + *
    + * + * * * * * * + * + * * * * @@ -196,6 +200,7 @@ import java.util.StringTokenizer; * described under the "removeProvider.{provider name}" permission. * * + * *
    target name, what the permission allows, and associated risks
    Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
    authProvider.{provider name}
    * *

    @@ -204,13 +209,17 @@ import java.util.StringTokenizer; * {@link IdentityScope}, {@link Signer}. Use of them is discouraged. See the * applicable classes for more information. * - * + *
    + * + * * * * * * + * * + * * * * @@ -308,6 +317,7 @@ import java.util.StringTokenizer; * data encrypted under that session key. * * + * *
    target name, what the permission allows, and associated risks
    Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
    insertProvider.{provider name}Addition of a new provider, with the specified name
    * * @implNote diff --git a/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java b/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java index 03469606eed..9a988f4dc93 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java +++ b/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -152,10 +152,14 @@ public interface X509Extension { * by periods. * *

    For example:
    - * + *
    + * + * * * * + * + * * * * @@ -176,6 +180,7 @@ public interface X509Extension { * * * + * *
    Examples of OIDs and extension names
    OID (Object Identifier)Extension Name
    2.5.29.14SubjectKeyIdentifier
    2.5.29.15AuthorityKeyIdentifier
    2.5.29.36PolicyConstraints
    * * @param oid the Object Identifier value for the extension. diff --git a/jdk/src/java.base/share/classes/java/text/DecimalFormat.java b/jdk/src/java.base/share/classes/java/text/DecimalFormat.java index 4484654afbd..eb5107cdea4 100644 --- a/jdk/src/java.base/share/classes/java/text/DecimalFormat.java +++ b/jdk/src/java.base/share/classes/java/text/DecimalFormat.java @@ -172,19 +172,22 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * are not localized. * *

    - * - * + *
    + * + * + * * + * * * + * * + * * + * * + * * + * * *
    Chart showing symbol, location, localized, and meaning.
    Symbol * Location * Localized? * Meaning + *
    0 * Number * Yes * Digit - *
    # * Number * Yes @@ -194,7 +197,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * Number * Yes * Decimal separator or monetary decimal separator - *
    - * Number * Yes @@ -204,7 +207,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * Number * Yes * Grouping separator - *
    E * Number * Yes @@ -215,7 +218,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * Subpattern boundary * Yes * Separates positive and negative subpatterns - *
    % * Prefix or suffix * Yes @@ -225,7 +228,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * Prefix or suffix * Yes * Multiply by 1000 and show as per mille value - *
    ¤ (\u00A4) * Prefix or suffix * No @@ -241,6 +244,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * for example, "'#'#" formats 123 to * "#123". To create a single quote * itself, use two in a row: "# o''clock". + *
    *
    * diff --git a/jdk/src/java.base/share/classes/java/text/MessageFormat.java b/jdk/src/java.base/share/classes/java/text/MessageFormat.java index 951e81f6473..1275f3cc33a 100644 --- a/jdk/src/java.base/share/classes/java/text/MessageFormat.java +++ b/jdk/src/java.base/share/classes/java/text/MessageFormat.java @@ -146,11 +146,15 @@ import java.util.Locale; * shown in the table are illegal. A SubformatPattern must * be a valid pattern string for the {@code Format} subclass used. * - * + *
    + * + * * * + * * * *
    Shows how FormatType and FormatStyle values map to Format instances
    FormatType * FormatStyle * Subformat Created + *
    (none) * (none) @@ -213,6 +217,7 @@ import java.util.Locale; * choice * SubformatPattern * {@code new} {@link ChoiceFormat#ChoiceFormat(String) ChoiceFormat}{@code (subformatPattern)} + *
    * *

    Usage Information

    @@ -766,11 +771,15 @@ public class MessageFormat extends Format { * argument is unavailable if arguments is * null or has fewer than argumentIndex+1 elements. * - * + *
    + * + * * * + * * * *
    Examples of subformat,argument,and formatted text
    Subformat * Argument * Formatted Text + *
    any * unavailable @@ -805,6 +814,7 @@ public class MessageFormat extends Format { * null * any * argument.toString() + *
    *

    * If pos is non-null, and refers to diff --git a/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java b/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java index 58cf6930679..70987ad99df 100644 --- a/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java +++ b/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java @@ -92,18 +92,22 @@ import sun.util.locale.provider.LocaleProviderAdapter; * 'A' to 'Z' and from 'a' to * 'z' are reserved): *

    - * - * + *
    + * + * + * * + * * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * + * * *
    Chart shows pattern letters, date/time component, presentation, and examples.
    Letter * Date or Time Component * Presentation * Examples + *
    G * Era designator * Text * AD - *
    y * Year * Year @@ -113,7 +117,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Week year * Year * 2009; 09 - *
    M * Month in year (context sensitive) * Month @@ -123,7 +127,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Month in year (standalone form) * Month * July; Jul; 07 - *
    w * Week in year * Number @@ -133,7 +137,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Week in month * Number * 2 - *
    D * Day in year * Number @@ -143,7 +147,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Day in month * Number * 10 - *
    F * Day of week in month * Number @@ -153,7 +157,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Day name in week * Text * Tuesday; Tue - *
    u * Day number of week (1 = Monday, ..., 7 = Sunday) * Number @@ -163,7 +167,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Am/pm marker * Text * PM - *
    H * Hour in day (0-23) * Number @@ -173,7 +177,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Hour in day (1-24) * Number * 24 - *
    K * Hour in am/pm (0-11) * Number @@ -183,7 +187,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Hour in am/pm (1-12) * Number * 12 - *
    m * Minute in hour * Number @@ -193,7 +197,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Second in minute * Number * 55 - *
    S * Millisecond * Number @@ -203,7 +207,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Time zone * General time zone * Pacific Standard Time; PST; GMT-08:00 - *
    Z * Time zone * RFC 822 time zone @@ -213,6 +217,7 @@ import sun.util.locale.provider.LocaleProviderAdapter; * Time zone * ISO 8601 time zone * -08; -0800; -08:00 + *
    *
    * Pattern letters are usually repeated, as their number determines the @@ -370,43 +375,48 @@ import sun.util.locale.provider.LocaleProviderAdapter; * the U.S. locale. The given date and time are 2001-07-04 12:08:56 local time * in the U.S. Pacific Time time zone. *
    - * - * + *
    + * + * + * * + * * * + * * * + * * * + * * * + * * * + * * * *
    Examples of date and time patterns interpreted in the U.S. locale
    Date and Time Pattern * Result + *
    "yyyy.MM.dd G 'at' HH:mm:ss z" * 2001.07.04 AD at 12:08:56 PDT - *
    "EEE, MMM d, ''yy" * Wed, Jul 4, '01 *
    "h:mm a" * 12:08 PM - *
    "hh 'o''clock' a, zzzz" * 12 o'clock PM, Pacific Daylight Time *
    "K:mm a, z" * 0:08 PM, PDT - *
    "yyyyy.MMMMM.dd GGG hh:mm aaa" * 02001.July.04 AD 12:08 PM *
    "EEE, d MMM yyyy HH:mm:ss Z" * Wed, 4 Jul 2001 12:08:56 -0700 - *
    "yyMMddHHmmssZ" * 010704120856-0700 *
    "yyyy-MM-dd'T'HH:mm:ss.SSSZ" * 2001-07-04T12:08:56.235-0700 - *
    "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" * 2001-07-04T12:08:56.235-07:00 *
    "YYYY-'W'ww-u" * 2001-W27-3 + *
    *
    * diff --git a/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java b/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java index 4dedfe3a247..0ec1b591bc2 100644 --- a/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java +++ b/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java @@ -103,17 +103,18 @@ import sun.util.logging.PlatformLogger; * *

    * CLDR and LDML identify variants: - * + *
    + * * - * - * - * - * - * + * + * + * + * + * * * * - * + * * * * @@ -147,36 +148,37 @@ import sun.util.logging.PlatformLogger; *

    * The Hijrah property resource is a set of properties that describe the calendar. * The syntax is defined by {@code java.util.Properties#load(Reader)}. - *

    Variants of Hijrah Calendars
    Chronology IDCalendar TypeLocale extension, see {@link java.util.Locale}Description
    Chronology IDCalendar TypeLocale extension, see {@link java.util.Locale}Description
    Hijrah-umalquraislamic-umalquraca-islamic-umalqura
    + *
    + * * - * - * - * - * + * + * + * + * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * diff --git a/jdk/src/java.base/share/classes/java/time/chrono/IsoEra.java b/jdk/src/java.base/share/classes/java/time/chrono/IsoEra.java index b376789bfe2..702fabdf920 100644 --- a/jdk/src/java.base/share/classes/java/time/chrono/IsoEra.java +++ b/jdk/src/java.base/share/classes/java/time/chrono/IsoEra.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,25 +70,26 @@ import java.time.DateTimeException; * A definition has therefore been created with two eras - 'Current era' (CE) for * years on or after 0001-01-01 (ISO), and 'Before current era' (BCE) for years before that. * - *
    Configuration of Hijrah Calendar
    Property Name Property value Description
    Property Name Property value Description
    idChronology Id, for example, "Hijrah-umalqura"The Id of the calendar in common usage
    typeCalendar type, for example, "islamic-umalqura"LDML defines the calendar types
    versionVersion, for example: "1.8.0_1"The version of the Hijrah variant data
    iso-startISO start date, formatted as {@code yyyy-MM-dd}, for example: "1900-04-30"The ISO date of the first day of the minimum Hijrah year.
    yyyy - a numeric 4 digit year, for example "1434"The value is a sequence of 12 month lengths, * for example: "29 30 29 30 29 30 30 30 29 30 29 29"
    + *
    + * * - * - * - * - * + * + * + * + * * * * - * + * * * - * + * * * - * + * * * - * + * * * * diff --git a/jdk/src/java.base/share/classes/java/time/chrono/MinguoEra.java b/jdk/src/java.base/share/classes/java/time/chrono/MinguoEra.java index a8a42a7cb58..edac0ec02e7 100644 --- a/jdk/src/java.base/share/classes/java/time/chrono/MinguoEra.java +++ b/jdk/src/java.base/share/classes/java/time/chrono/MinguoEra.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, 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 @@ -71,26 +71,27 @@ import java.time.DateTimeException; * All previous years, zero or earlier in the proleptic count or one and greater * in the year-of-era count, are part of the 'Before Republic of China' era. * - *
    ISO years and eras
    year-of-eraeraproleptic-year
    year-of-eraeraproleptic-year
    2CE2
    1CE1
    1BCE0
    2BCE-1
    + *
    + * * - * - * - * - * - * + * + * + * + * + * * * * - * + * * * - * + * * * - * + * * * - * + * * * * diff --git a/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistEra.java b/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistEra.java index 5bc2cda8b3f..53cb5d870be 100644 --- a/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistEra.java +++ b/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistEra.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, 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 @@ -71,26 +71,27 @@ import java.time.DateTimeException; * All previous years, zero or earlier in the proleptic count or one and greater * in the year-of-era count, are part of the 'Before Buddhist' era. * - *
    Minguo years and eras
    year-of-eraeraproleptic-yearISO proleptic-year
    year-of-eraeraproleptic-yearISO proleptic-year
    2ROC21913
    1ROC11912
    1BEFORE_ROC01911
    2BEFORE_ROC-11910
    + *
    + * * - * - * - * - * - * + * + * + * + * + * * * * - * + * * * - * + * * * - * + * * * - * + * * * * diff --git a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java index 6b0559b21ad..cda0f8abb48 100644 --- a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java +++ b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, 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 @@ -150,105 +150,106 @@ import java.util.Set; * implementation of {@code java.text.Format}. * *

    Predefined Formatters

    - *
    Buddhist years and eras
    year-of-eraeraproleptic-yearISO proleptic-year
    year-of-eraeraproleptic-yearISO proleptic-year
    2BE2-542
    1BE1-543
    1BEFORE_BE0-544
    2BEFORE_BE-1-545
    + *
    + * * - * - * - * - * + * + * + * + * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * - * + * * * * * - * + * * * * diff --git a/jdk/src/java.base/share/classes/java/time/temporal/IsoFields.java b/jdk/src/java.base/share/classes/java/time/temporal/IsoFields.java index 26e7e168446..9740a9defc0 100644 --- a/jdk/src/java.base/share/classes/java/time/temporal/IsoFields.java +++ b/jdk/src/java.base/share/classes/java/time/temporal/IsoFields.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, 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 @@ -136,15 +136,19 @@ import sun.util.locale.provider.LocaleResources; *

    * For example: * - *

    Predefined Formatters
    FormatterDescriptionExample
    FormatterDescriptionExample
    {@link #ofLocalizedDate ofLocalizedDate(dateStyle)} Formatter with date style from the locale '2011-12-03'
    {@link #ofLocalizedTime ofLocalizedTime(timeStyle)} Formatter with time style from the locale '10:15:30'
    {@link #ofLocalizedDateTime ofLocalizedDateTime(dateTimeStyle)} Formatter with a style for date and time from the locale '3 Jun 2008 11:05:30'
    {@link #ofLocalizedDateTime ofLocalizedDateTime(dateStyle,timeStyle)} * Formatter with date and time styles from the locale '3 Jun 2008 11:05'
    {@link #BASIC_ISO_DATE}Basic ISO date '20111203'
    {@link #ISO_LOCAL_DATE} ISO Local Date '2011-12-03'
    {@link #ISO_OFFSET_DATE} ISO Date with offset '2011-12-03+01:00'
    {@link #ISO_DATE} ISO Date with or without offset '2011-12-03+01:00'; '2011-12-03'
    {@link #ISO_LOCAL_TIME} Time without offset '10:15:30'
    {@link #ISO_OFFSET_TIME} Time with offset '10:15:30+01:00'
    {@link #ISO_TIME} Time with or without offset '10:15:30+01:00'; '10:15:30'
    {@link #ISO_LOCAL_DATE_TIME} ISO Local Date and Time '2011-12-03T10:15:30'
    {@link #ISO_OFFSET_DATE_TIME} Date Time with Offset * 2011-12-03T10:15:30+01:00'
    {@link #ISO_ZONED_DATE_TIME} Zoned Date Time '2011-12-03T10:15:30+01:00[Europe/Paris]'
    {@link #ISO_DATE_TIME} Date and time with ZoneId '2011-12-03T10:15:30+01:00[Europe/Paris]'
    {@link #ISO_ORDINAL_DATE} Year and day of year '2012-337'
    {@link #ISO_WEEK_DATE} Year and Week 2012-W48-6'
    {@link #ISO_INSTANT} Date and Time of an Instant '2011-12-03T10:15:30Z'
    {@link #RFC_1123_DATE_TIME} RFC 1123 / RFC 822 'Tue, 3 Jun 2008 11:05:30 GMT'
    + *
    * + * * + * + * * * * * * * + * *
    Examples of Week based Years
    DateDay-of-weekField values
    2008-12-28SundayWeek 52 of week-based-year 2008
    2008-12-29MondayWeek 1 of week-based-year 2009
    2008-12-31WednesdayWeek 1 of week-based-year 2009
    2009-01-01ThursdayWeek 1 of week-based-year 2009
    2009-01-04SundayWeek 1 of week-based-year 2009
    2009-01-05MondayWeek 2 of week-based-year 2009
    * * @implSpec diff --git a/jdk/src/java.base/share/classes/java/time/temporal/WeekFields.java b/jdk/src/java.base/share/classes/java/time/temporal/WeekFields.java index faee176d3e7..2f13368d28f 100644 --- a/jdk/src/java.base/share/classes/java/time/temporal/WeekFields.java +++ b/jdk/src/java.base/share/classes/java/time/temporal/WeekFields.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -127,10 +127,13 @@ import sun.util.locale.provider.LocaleResources; * The earliest period is referred to as week 0 if it has less than the minimal number of days * and week 1 if it has at least the minimal number of days. * - * + *
    * + * * * + * + * * * * @@ -139,6 +142,7 @@ import sun.util.locale.provider.LocaleResources; * * * + * *
    Examples of WeekFields
    DateDay-of-weekFirst day: Monday
    Minimal days: 4
    First day: Monday
    Minimal days: 5
    2008-12-31WednesdayWeek 5 of December 2008Week 5 of December 2008
    2009-01-01ThursdayWeek 1 of January 2009Week 0 of January 2009
    2009-01-05MondayWeek 2 of January 2009Week 1 of January 2009
    * *

    Week of Year

    @@ -157,10 +161,13 @@ import sun.util.locale.provider.LocaleResources; * The first and last weeks of a year may contain days from the * previous calendar year or next calendar year respectively. * - * + *
    * + * * * + * + * * * * @@ -169,6 +176,7 @@ import sun.util.locale.provider.LocaleResources; * * * + * *
    Examples of WeekFields for week-based-year
    DateDay-of-weekFirst day: Monday
    Minimal days: 4
    First day: Monday
    Minimal days: 5
    2008-12-31WednesdayWeek 1 of 2009Week 53 of 2008
    2009-01-01ThursdayWeek 1 of 2009Week 53 of 2008
    2009-01-05MondayWeek 2 of 2009Week 1 of 2009
    * * @implSpec diff --git a/jdk/src/java.base/share/classes/java/util/Deque.java b/jdk/src/java.base/share/classes/java/util/Deque.java index 9ea576886e1..48eaa3eb28b 100644 --- a/jdk/src/java.base/share/classes/java/util/Deque.java +++ b/jdk/src/java.base/share/classes/java/util/Deque.java @@ -56,7 +56,7 @@ package java.util; *

    The twelve methods described above are summarized in the * following table: * - * + *
    * * * @@ -99,7 +99,7 @@ package java.util; * inherited from the {@code Queue} interface are precisely equivalent to * {@code Deque} methods as indicated in the following table: * - *
    Summary of Deque methods
    + *
    * * * @@ -137,7 +137,7 @@ package java.util; * beginning of the deque. Stack methods are precisely equivalent to * {@code Deque} methods as indicated in the table below: * - *
    Comparison of Queue and Deque methods
    {@code Queue} Method
    + *
    * * * diff --git a/jdk/src/java.base/share/classes/java/util/Formatter.java b/jdk/src/java.base/share/classes/java/util/Formatter.java index f2609764a51..39c23af20ff 100644 --- a/jdk/src/java.base/share/classes/java/util/Formatter.java +++ b/jdk/src/java.base/share/classes/java/util/Formatter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, 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 @@ -290,12 +290,14 @@ import jdk.internal.math.FormattedFloatingDecimal; *
      *    out.toUpperCase(Locale.getDefault(Locale.Category.FORMAT)) 
    * - *
    Comparison of Stack and Deque methods
    Stack Method
    - * + *
    + * + * * + * * *
    genConv
    Conversion * Argument Category * Description - * + *
    {@code 'b'}, {@code 'B'} * general * If the argument arg is {@code null}, then the result is @@ -365,6 +367,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * line separator * The result is the platform-specific line separator * + *
    * *

    Any characters not explicitly defined as conversions are illegal and are @@ -381,8 +384,9 @@ import jdk.internal.math.FormattedFloatingDecimal; * *

    The following conversion characters are used for formatting times: * - * - * + *
    + * + * * *
    time
    {@code 'H'} * Hour of the day for the 24-hour clock, formatted as two digits with * a leading zero as necessary i.e. {@code 00 - 23}. @@ -446,11 +450,14 @@ import jdk.internal.math.FormattedFloatingDecimal; * 1970 {@code 00:00:00} UTC, i.e. {@code Long.MIN_VALUE} to * {@code Long.MAX_VALUE}. * + *
    * *

    The following conversion characters are used for formatting dates: * - * + *
    + * + * * * *
    date
    {@code 'B'} * Locale-specific {@linkplain java.text.DateFormatSymbols#getMonths @@ -502,12 +509,15 @@ import jdk.internal.math.FormattedFloatingDecimal; *
    {@code 'e'} * Day of month, formatted as two digits, i.e. {@code 1 - 31}. * + *
    * *

    The following conversion characters are used for formatting common * date/time compositions. * - * + *
    + * + * * * *
    composites
    {@code 'R'} * Time formatted for the 24-hour clock as {@code "%tH:%tM"} @@ -531,6 +541,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * Date and time formatted as {@code "%ta %tb %td %tT %tZ %tY"}, * e.g. {@code "Sun Jul 20 16:17:00 EDT 1969"}. * + *
    * *

    Any characters not explicitly defined as date/time conversion suffixes @@ -541,14 +552,16 @@ import jdk.internal.math.FormattedFloatingDecimal; *

    The following table summarizes the supported flags. y means the * flag is supported for the indicated argument types. * - * - * + *
    + * + * * + * * *
    genConv
    Flag General * Character Integral * Floating Point * Date/Time * Description - * + *
    '-' y * y * y @@ -599,6 +612,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * - * The result will enclose negative numbers in parentheses * + *
    * *

    1 Depends on the definition of {@link Formattable}. @@ -705,7 +719,9 @@ import jdk.internal.math.FormattedFloatingDecimal; * *

    The following general conversions may be applied to any argument type: * - * + *
    + * + * * * *
    dgConv
    {@code 'b'} * '\u0062' @@ -756,11 +772,14 @@ import jdk.internal.math.FormattedFloatingDecimal; * '\u0053' * The upper-case variant of {@code 's'}. * + *
    * *

    The following flags apply to general conversions: * - * + *
    + * + * * * *
    dFlags
    {@code '-'} * '\u002d' @@ -775,6 +794,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * Requires the output use an alternate form. The definition of the * form is specified by the conversion. * + *
    * *

    The width is the minimum number of characters to @@ -801,7 +821,9 @@ import jdk.internal.math.FormattedFloatingDecimal; * {@code false} then an {@link IllegalFormatCodePointException} will be * thrown. * - * + *
    + * + * * * *
    charConv
    {@code 'c'} * '\u0063' @@ -817,6 +839,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * '\u0043' * The upper-case variant of {@code 'c'}. * + *
    * *

    The {@code '-'} flag defined for General @@ -902,7 +925,9 @@ import jdk.internal.math.FormattedFloatingDecimal; * {@code short}, {@link Short}, {@code int} and {@link Integer}, * {@code long}, and {@link Long}. * - * + *
    + * + * * * *
    IntConv
    {@code 'd'} * '\u0064' @@ -968,6 +993,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * all hexadecimal digits {@code 'a'} - {@code 'f'} * ('\u0061' - '\u0066'). * + *
    * *

    If the conversion is {@code 'o'}, {@code 'x'}, or {@code 'X'} and @@ -982,7 +1008,9 @@ import jdk.internal.math.FormattedFloatingDecimal; *

    The following flags apply to numeric integral * conversions: * - * + *
    + * + * * * *
    intFlags
    {@code '+'} * '\u002b' @@ -1025,6 +1053,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * ('\u0028') and append a {@code ')'} * ('\u0029') to negative values. * + *
    * *

    If no flags are given the default formatting is @@ -1060,7 +1089,9 @@ import jdk.internal.math.FormattedFloatingDecimal; *

    The following conversions may be applied to {@link * java.math.BigInteger}. * - * + *
    + * + * * * *
    bIntConv
    {@code 'd'} * '\u0064' @@ -1125,6 +1156,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * all hexadecimal digits {@code 'a'} - {@code 'f'} * ('\u0061' - '\u0066'). * + *
    * *

    If the conversion is {@code 'o'}, {@code 'x'}, or {@code 'X'} and @@ -1154,7 +1186,9 @@ import jdk.internal.math.FormattedFloatingDecimal; *

    The following conversions may be applied to {@code float}, {@link * Float}, {@code double} and {@link Double}. * - * + *
    + * + * * * *
    floatConv
    {@code 'e'} * '\u0065' @@ -1331,6 +1365,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * ('\u0070' and all hexadecimal digits {@code 'a'} - * {@code 'f'} ('\u0061' - '\u0066'). * + *
    * *

    All flags defined for Byte, Short, Integer, and @@ -1388,7 +1423,9 @@ import jdk.internal.math.FormattedFloatingDecimal; *

    The following conversions may be applied {@link java.math.BigDecimal * BigDecimal}. * - * + *
    + * + * * * *
    floatConv
    {@code 'e'} * '\u0065' @@ -1492,6 +1529,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * For a canonical representation of the value, use {@link * BigDecimal#toString()}. * + *
    * *

    All flags defined for Byte, Short, Integer, and @@ -1512,7 +1550,9 @@ import jdk.internal.math.FormattedFloatingDecimal; *

    This conversion may be applied to {@code long}, {@link Long}, {@link * Calendar}, {@link Date} and {@link TemporalAccessor TemporalAccessor} * - * + *
    + * + * * * *
    DTConv
    {@code 't'} * '\u0074' @@ -1521,6 +1561,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * '\u0054' * The upper-case variant of {@code 't'}. * + *
    * *

    The following date and time conversion character suffixes are defined @@ -1532,7 +1573,9 @@ import jdk.internal.math.FormattedFloatingDecimal; * *

    The following conversion characters are used for formatting times: * - * + *
    + * + * * * *
    time
    {@code 'H'} * '\u0048' @@ -1620,11 +1663,14 @@ import jdk.internal.math.FormattedFloatingDecimal; * {@code Long.MAX_VALUE}. The precision of this value is limited by * the resolution of the underlying operating system or hardware. * + *
    * *

    The following conversion characters are used for formatting dates: * - * + *
    + * + * * * *
    date
    {@code 'B'} * '\u0042' @@ -1692,12 +1738,15 @@ import jdk.internal.math.FormattedFloatingDecimal; * Day of month, formatted as two digits, i.e. {@code 1 - 31} where * "{@code 1}" is the first day of the month. * + *
    * *

    The following conversion characters are used for formatting common * date/time compositions. * - * + *
    + * + * * * *
    composites
    {@code 'R'} * '\u0052' @@ -1727,6 +1776,7 @@ import jdk.internal.math.FormattedFloatingDecimal; * Date and time formatted as {@code "%ta %tb %td %tT %tZ %tY"}, * e.g. {@code "Sun Jul 20 16:17:00 EDT 1969"}. * + *
    * *

    The {@code '-'} flag defined for General @@ -1748,7 +1798,9 @@ import jdk.internal.math.FormattedFloatingDecimal; * *

    The conversion does not correspond to any argument. * - * + *
    + * + * * * *
    DTConv
    {@code '%'} * The result is a literal {@code '%'} ('\u0025') @@ -1767,18 +1819,22 @@ import jdk.internal.math.FormattedFloatingDecimal; *

    The precision is not applicable. If the precision is specified an * {@link IllegalFormatPrecisionException} will be thrown. * + *

    * *

    Line Separator

    * *

    The conversion does not correspond to any argument. * - * + *
    + * + * * * *
    DTConv
    {@code 'n'} * the platform-specific line separator as returned by {@link * System#lineSeparator()}. * + *
    * *

    Flags, width, and precision are not applicable. If any are provided an diff --git a/jdk/src/java.base/share/classes/java/util/GregorianCalendar.java b/jdk/src/java.base/share/classes/java/util/GregorianCalendar.java index c482aa96747..8d2835fe5ac 100644 --- a/jdk/src/java.base/share/classes/java/util/GregorianCalendar.java +++ b/jdk/src/java.base/share/classes/java/util/GregorianCalendar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2017, 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 @@ -159,88 +159,89 @@ import sun.util.calendar.ZoneInfo; * undefined. GregorianCalendar uses the following * default value for each calendar field if its value is undefined. * - * + *
    + * + * + * + * + * + * + * * * - * - * - * - * - * - * * * - * - * * * - * - * * * - * - * * * - * - * * * - * - * * * - * - * * * - * - * * * - * - * * * diff --git a/jdk/src/java.base/share/classes/java/util/Locale.java b/jdk/src/java.base/share/classes/java/util/Locale.java index 2057e3befa4..45d13fa3db9 100644 --- a/jdk/src/java.base/share/classes/java/util/Locale.java +++ b/jdk/src/java.base/share/classes/java/util/Locale.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2017, 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 @@ -1587,44 +1587,50 @@ public final class Locale implements Cloneable, Serializable { * *

    Grandfathered tags with canonical replacements are as follows: * - *

    GregorianCalendar default field values
    + * Field + * + Default Value + *
    Field
    - *
    Default Value
    - *
    - * ERA
    + *
    + * ERA * - * AD
    + *
    + * AD *
    - * YEAR
    + *
    + * YEAR * - * 1970
    + *
    + * 1970 *
    - * MONTH
    + *
    + * MONTH * - * JANUARY
    + *
    + * JANUARY *
    - * DAY_OF_MONTH
    + *
    + * DAY_OF_MONTH * - * 1
    + *
    + * 1 *
    - * DAY_OF_WEEK
    + *
    + * DAY_OF_WEEK * - * the first day of week
    + *
    + * the first day of week *
    - * WEEK_OF_MONTH
    + *
    + * WEEK_OF_MONTH * - * 0
    + *
    + * 0 *
    - * DAY_OF_WEEK_IN_MONTH
    + *
    + * DAY_OF_WEEK_IN_MONTH * - * 1
    + *
    + * 1 *
    - * AM_PM
    + *
    + * AM_PM * - * AM
    + *
    + * AM *
    - * HOUR, HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND
    + *
    + * HOUR, HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND * - * 0
    + *
    + * 0 *
    + *
    + * + * + * + * * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * * *
    Grandfathered tags with canonical replacements
    grandfathered tagmodern replacement
    grandfathered tag modern replacement
    art-lojban jbo
    i-ami ami
    i-bnn bnn
    i-hak hak
    i-klingon tlh
    i-lux lb
    i-navajo nv
    i-pwn pwn
    i-tao tao
    i-tay tay
    i-tsu tsu
    no-bok nb
    no-nyn nn
    sgn-BE-FR sfb
    sgn-BE-NL vgt
    sgn-CH-DE sgg
    zh-guoyu cmn
    zh-hakka hak
    zh-min-nan nan
    zh-xiang hsn
    art-lojbanjbo
    i-amiami
    i-bnnbnn
    i-hakhak
    i-klingontlh
    i-luxlb
    i-navajonv
    i-pwnpwn
    i-taotao
    i-taytay
    i-tsutsu
    no-boknb
    no-nynnn
    sgn-BE-FRsfb
    sgn-BE-NLvgt
    sgn-CH-DEsgg
    zh-guoyucmn
    zh-hakkahak
    zh-min-nannan
    zh-xianghsn
    * *

    Grandfathered tags with no modern replacement will be * converted as follows: * - * + *
    + * + * + * + * * - * - * - * - * - * - * - * + * + * + * + * + * + * * *
    Grandfathered tags with no modern replacement
    grandfathered tagconverts to
    grandfathered tag converts to
    cel-gaulish xtg-x-cel-gaulish
    en-GB-oed en-GB-x-oed
    i-default en-x-i-default
    i-enochian und-x-i-enochian
    i-mingo see-x-i-mingo
    zh-min nan-x-zh-min
    cel-gaulishxtg-x-cel-gaulish
    en-GB-oeden-GB-x-oed
    i-defaulten-x-i-default
    i-enochianund-x-i-enochian
    i-mingosee-x-i-mingo
    zh-minnan-x-zh-min
    * @@ -2767,12 +2773,16 @@ public final class Locale implements Cloneable, Serializable { * * The filtering method will behave as follows: * - * + *
    + * + * * * * * * + * + * * * * + * *
    Filtering method behavior
    Filtering ModeLanguage Priority List: {@code "de-DE"}Language Priority List: {@code "de-*-DE"}
    * {@link FilteringMode#AUTOSELECT_FILTERING AUTOSELECT_FILTERING} @@ -2832,6 +2842,7 @@ public final class Locale implements Cloneable, Serializable { * not a valid basic language range. *
    * * @see #filter(List, Collection, FilteringMode) diff --git a/jdk/src/java.base/share/classes/java/util/Queue.java b/jdk/src/java.base/share/classes/java/util/Queue.java index 914e293ce2c..f8383b67b41 100644 --- a/jdk/src/java.base/share/classes/java/util/Queue.java +++ b/jdk/src/java.base/share/classes/java/util/Queue.java @@ -47,7 +47,7 @@ package java.util; * implementations; in most implementations, insert operations cannot * fail. * - * + *
    * * * diff --git a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java index bd95564ade8..e7fecee180c 100644 --- a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java +++ b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java @@ -1222,12 +1222,15 @@ public abstract class ResourceBundle { *

    Calling getBundle with the locale arguments below will * instantiate resource bundles as follows: * - *

    Summary of Queue methods
    + *
    + * + * * * * * * + * *
    getBundle() locale to resource bundle mapping
    Locale("fr", "CH")MyResources_fr_CH.class, parent MyResources_fr.properties, parent MyResources.class
    Locale("fr", "FR")MyResources_fr.properties, parent MyResources.class
    Locale("de", "DE")MyResources_en.properties, parent MyResources.class
    Locale("en", "US")MyResources_en.properties, parent MyResources.class
    Locale("es", "ES")MyResources_es_ES.class, parent MyResources.class
    * *

    The file MyResources_fr_CH.properties is never used because it is @@ -1311,9 +1314,9 @@ public abstract class ResourceBundle { * sequence of locale-format combinations to be used to call * control.newBundle. * - * - * + *
    + * + * * * * + * + * * * diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java b/jdk/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java index 36fc4fd63d6..f93af80ad48 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java @@ -53,7 +53,7 @@ import java.util.NoSuchElementException; * and the fourth blocks for only a given maximum time limit before giving * up. These methods are summarized in the following table: * - *
    locale-format combinations for newBundle
    Locale
    @@ -1322,6 +1325,8 @@ public abstract class ResourceBundle { * style="vertical-align: top; text-align: left; font-weight: bold; width: 50%;">format
    *
    Locale("de", "DE")
    *
    + *
    * * * @@ -128,7 +128,7 @@ import java.util.NoSuchElementException; * {@code BlockingQueue} interface are precisely equivalent to * {@code BlockingDeque} methods as indicated in the following table: * - *
    Summary of BlockingDeque methods
    First Element (Head)
    + *
    * * * diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java index 64190701af2..65a523e6b40 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java @@ -53,7 +53,7 @@ import java.util.Queue; * and the fourth blocks for only a given maximum time limit before giving * up. These methods are summarized in the following table: * - *
    Comparison of BlockingQueue and BlockingDeque methods
    {@code BlockingQueue} Method
    + *
    * * * diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java index 4a0b3bb0ff7..cd14b0057ec 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java @@ -109,7 +109,7 @@ import java.util.concurrent.locks.LockSupport; * async event-style tasks that are not usually joined, in which case * there is little difference among choice of methods. * - *
    Summary of BlockingQueue methods
    + *
    * * * diff --git a/jdk/src/java.base/share/classes/java/util/regex/Pattern.java b/jdk/src/java.base/share/classes/java/util/regex/Pattern.java index 1b03f26b686..b79c850bebf 100644 --- a/jdk/src/java.base/share/classes/java/util/regex/Pattern.java +++ b/jdk/src/java.base/share/classes/java/util/regex/Pattern.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, 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 @@ -79,13 +79,15 @@ import java.util.stream.StreamSupport; * *

    Summary of regular-expression constructs

    * - *
    Summary of task execution methods
    - * + *
    + * + * * * * * + * + * * * * @@ -383,6 +385,7 @@ import java.util.stream.StreamSupport; * * * + * *
    Regular expression constructs, and what they match
    ConstructMatches
     
    Characters
    {@code (?>}X{@code )}X, as an independent, non-capturing group
    * *


    @@ -429,8 +432,9 @@ import java.util.stream.StreamSupport; *

    The precedence of character-class operators is as follows, from * highest to lowest: * - *

    + *
    + * + * * * * @@ -446,6 +450,7 @@ import java.util.stream.StreamSupport; * * * + * *
    Precedence of character class operators.
    1    Literal escape    {@code \x}
    5    Intersection{@code [a-z&&[aeiou]]}
    * *

    Note that a different set of metacharacters are in effect inside @@ -496,7 +501,9 @@ import java.util.stream.StreamSupport; * left to right. In the expression {@code ((A)(B(C)))}, for example, there * are four such groups:

    * - *
    + *
    + * + * * * * @@ -505,6 +512,7 @@ import java.util.stream.StreamSupport; * * * + * *
    Capturing group numberings
    1    {@code ((A)(B(C)))}
    2    {@code (B(C))}
    4    {@code (C)}
    * *

    Group zero always stands for the entire expression. @@ -641,12 +649,15 @@ import java.util.stream.StreamSupport; * of Unicode Regular Expression * , when {@link #UNICODE_CHARACTER_CLASS} flag is specified. * - * + *
    + * + * * * * - * + * + * + * * * * @@ -685,6 +696,7 @@ import java.util.stream.StreamSupport; * * * + * *
    predefined and posix character classes in Unicode mode
    ClassesMatches
    {@code \p{Lower}}A lowercase character:{@code \p{IsLowercase}}
    {@code \p{Upper}}A word character: {@code [\p{Alpha}\p{gc=Mn}\p{gc=Me}\p{gc=Mc}\p{Digit}\p{gc=Pc}\p{IsJoin_Control}]}
    {@code \W}A non-word character: {@code [^\w]}
    *

    * @@ -1207,11 +1219,14 @@ public final class Pattern *

    The input {@code "boo:and:foo"}, for example, yields the following * results with these parameters: * - *

    + *
    + * + * * * * + * + * * * * @@ -1230,6 +1245,7 @@ public final class Pattern * * * + * *
    Split examples showing regex, limit, and result
    Regex    Limit    Result    
    :2{@code { "boo", "and:foo" }}
    o0{@code { "b", "", ":and:f" }}
    * * @param input @@ -1294,14 +1310,18 @@ public final class Pattern *

    The input {@code "boo:and:foo"}, for example, yields the following * results with these expressions: * - *

    + *
    + * + * * * + * + * * * * * + * *
    Split examples showing regex and result
    Regex    Result
    :{@code { "boo", "and", "foo" }}
    o{@code { "b", "", ":and:f" }}
    * * diff --git a/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java b/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java index 4c08dd0eb73..396ffeae696 100644 --- a/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java +++ b/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, 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 @@ -46,12 +46,16 @@ import java.util.Map; * Calendar}. The following are calendar-common fields and their values to be * supported for each calendar system. * - * + *
    + * + * * * * * * + * + * * * * @@ -73,17 +77,22 @@ import java.util.Map; * * * + * *
    Field values
    FieldValueDescription
    {@link Calendar#MONTH}{@link Calendar#JANUARY} to {@link Calendar#UNDECIMBER}{@link Calendar#AM} to {@link Calendar#PM}0 - AM, 1 - PM
    * *

    The following are calendar-specific fields and their values to be supported. * - * + *
    + * + * * * * * * * + * + * * * * @@ -154,6 +163,7 @@ import java.util.Map; * * * + * *
    Calendar type and field values
    Calendar TypeFieldValueDescription
    {@code "gregory"}{@link Calendar#ERA}1Anno Hijrah (AH)
    * *

    Calendar field value names for {@code "gregory"} must be consistent with diff --git a/jdk/src/java.base/share/classes/java/util/stream/StreamOpFlag.java b/jdk/src/java.base/share/classes/java/util/stream/StreamOpFlag.java index e4ad988eaf1..a8e06b2f7ce 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/StreamOpFlag.java +++ b/jdk/src/java.base/share/classes/java/util/stream/StreamOpFlag.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, 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 @@ -41,7 +41,7 @@ import java.util.Spliterator; * contexts: * *

    - * + *
    * * * diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLPermission.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLPermission.java index b27142128ae..9db1f79a0d2 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLPermission.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -44,14 +44,17 @@ import java.security.*; * and for each provides a description of what the permission allows * and a discussion of the risks of granting code the permission. * - *
    Type Characteristics
    + *
    + * + * * * * * * + * * + * * * * * * + * *
    permission name, what it allows, and associated risks
    Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
    setHostnameVerifierThe ability to set a callback which can decide whether to @@ -84,6 +87,7 @@ import java.security.*; *
    * * @see java.security.BasicPermission From 810e80970aaf23855dde1bd60ff2905507481546 Mon Sep 17 00:00:00 2001 From: Doug Lea Date: Thu, 11 May 2017 19:34:59 -0400 Subject: [PATCH 11/26] 8179515: Class java.util.concurrent.ThreadLocalRandom fails to Initialize when using SecurityManager Break connection to security framework by using VM.getSavedProperty to read the proeprty. Reviewed-by: dholmes, martin, redestad, psandoz, mchung --- .../classes/java/util/concurrent/ThreadLocalRandom.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java index 22c1f9a2e29..02820050420 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java @@ -49,6 +49,7 @@ import java.util.stream.IntStream; import java.util.stream.LongStream; import java.util.stream.StreamSupport; import jdk.internal.misc.Unsafe; +import jdk.internal.misc.VM; /** * A random number generator isolated to the current thread. Like the @@ -1093,11 +1094,8 @@ public class ThreadLocalRandom extends Random { // at end of to survive static initialization circularity static { - if (java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction<>() { - public Boolean run() { - return Boolean.getBoolean("java.util.secureRandomSeed"); - }})) { + String sec = VM.getSavedProperty("java.util.secureRandomSeed"); + if (Boolean.parseBoolean(sec)) { byte[] seedBytes = java.security.SecureRandom.getSeed(8); long s = (long)seedBytes[0] & 0xffL; for (int i = 1; i < 8; ++i) From 147981060124c248d278c54b6c13689cd527001d Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Thu, 11 May 2017 18:04:24 -0700 Subject: [PATCH 12/26] 8180256: Fix HTML 5 issues in java.sql and java.sql.rowset modules Reviewed-by: lancea --- .../classes/javax/sql/rowset/package.html | 65 +++++----- .../classes/javax/sql/rowset/spi/package.html | 20 +-- .../share/classes/java/sql/SQLPermission.java | 9 +- .../share/classes/java/sql/Statement.java | 122 ++++++++++-------- 4 files changed, 115 insertions(+), 101 deletions(-) diff --git a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/package.html b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/package.html index 1d9bf523cd5..ad5f08e2986 100644 --- a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/package.html +++ b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/package.html @@ -1,11 +1,11 @@ - - + + javax.sql.rowset Package - + Standard interfaces and base classes for JDBC RowSet @@ -48,7 +48,7 @@ that a standard RowSet implementation either implements or extends.
  • 5.0 Related Documentation -

    1.0 Package Specification

    +

    1.0 Package Specification

    This package specifies five standard JDBC RowSet interfaces. All five extend the RowSet interface described in the JDBC 3.0 @@ -63,7 +63,7 @@ developers who intend to provide their own compliant RowSet impleme should pay particular attention to the assertions detailed in specification interfaces. -

    2.0 Standard RowSet Definitions

    +

    2.0 Standard RowSet Definitions

    • JdbcRowSet - A wrapper around a ResultSet object that makes it possible to use the result set as a @@ -136,7 +136,7 @@ column matches, a JoinRowSet object establishes relationships betwe RowSet instances without the need to touch the originating data source.
    -

    3.0 Implementer's Guide

    +

    3.0 Implementer's Guide

    Compliant implementations of JDBC RowSet Implementations must follow the assertions described in this specification. In accordance with the terms of the Java Community Process, a @@ -173,47 +173,40 @@ the BaseRowSet class as a basis for their implementations. The following table illustrates the features that the BaseRowSet abstract class provides.
    - +
    + + + + + + + - - - - - - + +the standard RowSet properties. - - + +by compliant implementations. - - + + - - + +
    Features in BaseRowSet
    FeatureDetails
    Feature
    -
    Details
    -
    Properties
    -
    Provides standard JavaBeans property manipulation + PropertiesProvides standard JavaBeans property manipulation mechanisms to allow applications to get and set RowSet command and property values. Refer to the documentation of the javax.sql.RowSet interface (available in the JDBC 3.0 specification) for more details on -the standard RowSet properties.
    -
    Event notification
    -
    Provides standard JavaBeans event notifications + Event notificationProvides standard JavaBeans event notifications to registered event listeners. Refer to the documentation of javax.sql.RowSetEvent interface (available in the JDBC 3.0 specification) for more details on how to register and handle standard RowSet events generated -by compliant implementations.
    -
    Setters for a RowSet object's command
    -
    Provides a complete set of setter methods - for setting RowSet command parameters.
    -
    Setters for a RowSet object's commandProvides a complete set of setter methods + for setting RowSet command parameters.
    Streams
    -
    Provides fields for storing of stream instances - in addition to providing a set of constants for stream type designation.
    -
    StreamsProvides fields for storing of stream instances + in addition to providing a set of constants for stream type designation.
    @@ -289,13 +282,13 @@ match column as a basis for adding the RowSet object.
  • -

    4.0 Related Specifications

    +

    4.0 Related Specifications

    -

    5.0 Related Documentation

    +

    5.0 Related Documentation

    • JDBC RowSet Tutorial diff --git a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/package.html b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/package.html index b5aada863b4..3c3dbc5eec1 100644 --- a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/package.html +++ b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/package.html @@ -1,5 +1,5 @@ - - + + diff --git a/jdk/src/java.naming/share/classes/javax/naming/directory/package.html b/jdk/src/java.naming/share/classes/javax/naming/directory/package.html index eb363d71a39..c339eb2f043 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/directory/package.html +++ b/jdk/src/java.naming/share/classes/javax/naming/directory/package.html @@ -82,7 +82,7 @@ that support more sophisticated search filters.

      Package Specification

      The JNDI API Specification and related documents can be found in the -JNDI documentation. +{@extLink jndi_overview JNDI documentation}. @since 1.3 diff --git a/jdk/src/java.naming/share/classes/javax/naming/event/package.html b/jdk/src/java.naming/share/classes/javax/naming/event/package.html index e70ca97a03c..899981e77f9 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/event/package.html +++ b/jdk/src/java.naming/share/classes/javax/naming/event/package.html @@ -117,7 +117,7 @@ and the listener is automatically deregistered. The JNDI API Specification and related documents can be found in the -JNDI documentation. +{@extLink jndi_overview JNDI documentation}. @since 1.3 diff --git a/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html b/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html index 8af8ce7b988..e43cdc54670 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html +++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html @@ -258,7 +258,7 @@ public class VendorXControlFactory extends ControlFactory {

      Package Specification

      The JNDI API Specification and related documents can be found in the -JNDI documentation. +{@extLink jndi_overview JNDI documentation}. @since 1.3 diff --git a/jdk/src/java.naming/share/classes/javax/naming/package.html b/jdk/src/java.naming/share/classes/javax/naming/package.html index 224e0cbddf7..817720fdbb2 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/package.html +++ b/jdk/src/java.naming/share/classes/javax/naming/package.html @@ -135,7 +135,7 @@ Otherwise, programs should catch NamingException.

      Package Specification

      The JNDI API Specification and related documents can be found in the -JNDI documentation. +{@extLink jndi_overview JNDI documentation}. @since 1.3 diff --git a/jdk/src/java.naming/share/classes/javax/naming/spi/package.html b/jdk/src/java.naming/share/classes/javax/naming/spi/package.html index 6d7dd578c2a..73ee0f9d30e 100644 --- a/jdk/src/java.naming/share/classes/javax/naming/spi/package.html +++ b/jdk/src/java.naming/share/classes/javax/naming/spi/package.html @@ -82,7 +82,7 @@ different providers to cooperate to complete JNDI operations.

      Package Specification

      The JNDI SPI Specification and related documents can be found in the -JNDI documentation. +{@extLink jndi_overview JNDI documentation}. @since 1.3 From f5156046b4ac1ab87f14e9998719b1960652aef4 Mon Sep 17 00:00:00 2001 From: Lance Andersen Date: Fri, 12 May 2017 14:35:58 -0400 Subject: [PATCH 18/26] 8180309: Minor update to javax.sql.rowset package.html Reviewed-by: mchung --- .../java.sql.rowset/share/classes/javax/sql/rowset/package.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/package.html b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/package.html index ad5f08e2986..e52d3c9ec99 100644 --- a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/package.html +++ b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/package.html @@ -284,7 +284,7 @@ match column as a basis for adding the RowSet object.

      4.0 Related Specifications

      From 48dc9fb500e41b6242e5e38278f4dfb003cd6169 Mon Sep 17 00:00:00 2001 From: Roger Riggs Date: Fri, 12 May 2017 15:15:43 -0400 Subject: [PATCH 19/26] 8180082: Broken javadoc links Reviewed-by: mchung, bpb, chegar, ihse --- .../share/classes/java/io/ObjectInputStream.java | 3 ++- .../share/classes/java/io/ObjectOutputStream.java | 5 +++-- .../share/classes/java/io/ObjectStreamClass.java | 9 +++++---- .../java.base/share/classes/java/io/package-info.java | 8 +++++--- .../java.base/share/classes/java/lang/CharSequence.java | 6 +++--- .../java.base/share/classes/java/lang/ModuleLayer.java | 2 +- jdk/src/java.base/share/classes/java/lang/String.java | 2 +- jdk/src/java.base/share/classes/java/security/Key.java | 4 ++-- .../java.base/share/classes/java/security/KeyRep.java | 4 ++-- jdk/src/java.base/share/specs/serialization/output.md | 3 ++- .../share/classes/java/lang/management/package.html | 9 ++++----- .../share/classes/com/sun/management/package-info.java | 2 +- 12 files changed, 31 insertions(+), 26 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java b/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java index 15d735e88c3..bffc5a81ee8 100644 --- a/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java +++ b/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java @@ -216,7 +216,8 @@ import sun.reflect.misc.ReflectUtil; * @see java.io.DataInput * @see java.io.ObjectOutputStream * @see java.io.Serializable - * @see Object Serialization Specification, Section 3, Object Input Classes + * @see + * Object Serialization Specification, Section 3, Object Input Classes * @since 1.1 */ public class ObjectInputStream diff --git a/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java b/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java index 06845442958..135e5645a36 100644 --- a/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java +++ b/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2017, 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 @@ -156,7 +156,8 @@ import sun.reflect.misc.ReflectUtil; * @see java.io.ObjectInputStream * @see java.io.Serializable * @see java.io.Externalizable - * @see Object Serialization Specification, Section 2, Object Output Classes + * @see + * Object Serialization Specification, Section 2, Object Output Classes * @since 1.1 */ public class ObjectOutputStream diff --git a/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java b/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java index 0f2af6495fe..e5a323830ee 100644 --- a/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java +++ b/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2017, 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 @@ -62,13 +62,14 @@ import static java.io.ObjectStreamField.*; * loaded in this Java VM can be found/created using the lookup method. * *

      The algorithm to compute the SerialVersionUID is described in - * Object - * Serialization Specification, Section 4.6, Stream Unique Identifiers. + * + * Object Serialization Specification, Section 4.6, Stream Unique Identifiers. * * @author Mike Warres * @author Roger Riggs * @see ObjectStreamField - * @see Object Serialization Specification, Section 4, Class Descriptors + * @see + * Object Serialization Specification, Section 4, Class Descriptors * @since 1.1 */ public class ObjectStreamClass implements Serializable { diff --git a/jdk/src/java.base/share/classes/java/io/package-info.java b/jdk/src/java.base/share/classes/java/io/package-info.java index cf1b699cd0d..3d9685886cb 100644 --- a/jdk/src/java.base/share/classes/java/io/package-info.java +++ b/jdk/src/java.base/share/classes/java/io/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, 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 @@ -33,7 +33,8 @@ * *

      Package Specification

      * * *

      Related Documentation

      @@ -41,7 +42,8 @@ * For overviews, tutorials, examples, guides, and tool documentation, * please see: *
        - *
      • Serialization Enhancements + *
      • {@extLink serialver_tool_reference The serialver tool}
      • + *
      • {@extLink serialization_guide Serialization Documentation}
      • *
      * * @since 1.0 diff --git a/jdk/src/java.base/share/classes/java/lang/CharSequence.java b/jdk/src/java.base/share/classes/java/lang/CharSequence.java index 2972f10079f..e8ee5aa5b50 100644 --- a/jdk/src/java.base/share/classes/java/lang/CharSequence.java +++ b/jdk/src/java.base/share/classes/java/lang/CharSequence.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -123,7 +123,7 @@ public interface CharSequence { * *

      The stream binds to this sequence when the terminal stream operation * commences (specifically, for mutable sequences the spliterator for the - * stream is late-binding). + * stream is late-binding). * If the sequence is modified during that operation then the result is * undefined. * @@ -173,7 +173,7 @@ public interface CharSequence { * *

      The stream binds to this sequence when the terminal stream operation * commences (specifically, for mutable sequences the spliterator for the - * stream is late-binding). + * stream is late-binding). * If the sequence is modified during that operation then the result is * undefined. * diff --git a/jdk/src/java.base/share/classes/java/lang/ModuleLayer.java b/jdk/src/java.base/share/classes/java/lang/ModuleLayer.java index 549662ff9c0..70fbd8bce81 100644 --- a/jdk/src/java.base/share/classes/java/lang/ModuleLayer.java +++ b/jdk/src/java.base/share/classes/java/lang/ModuleLayer.java @@ -84,7 +84,7 @@ import sun.security.util.SecurityConstants; * started. The boot layer contains module {@code java.base} and is the only * layer in the Java virtual machine with a module named "{@code java.base}". * The modules in the boot layer are mapped to the bootstrap class loader and - * other class loaders that are + * other class loaders that are * built-in into the Java virtual machine. The boot layer will often be * the {@link #parents() parent} when creating additional layers.

      * diff --git a/jdk/src/java.base/share/classes/java/lang/String.java b/jdk/src/java.base/share/classes/java/lang/String.java index ea94633597c..7191669709e 100644 --- a/jdk/src/java.base/share/classes/java/lang/String.java +++ b/jdk/src/java.base/share/classes/java/lang/String.java @@ -203,7 +203,7 @@ public final class String * Class String is special cased within the Serialization Stream Protocol. * * A String instance is written into an ObjectOutputStream according to - * + * * Object Serialization Specification, Section 6.2, "Stream Elements" */ private static final ObjectStreamField[] serialPersistentFields = diff --git a/jdk/src/java.base/share/classes/java/security/Key.java b/jdk/src/java.base/share/classes/java/security/Key.java index 09542e394a2..0f8e84e718e 100644 --- a/jdk/src/java.base/share/classes/java/security/Key.java +++ b/jdk/src/java.base/share/classes/java/security/Key.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2017, 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 @@ -82,7 +82,7 @@ package java.security; *

      A Key should use KeyRep as its serialized representation. * Note that a serialized Key may contain sensitive information * which should not be exposed in untrusted environments. See the - * + * * Security Appendix * of the Serialization Specification for more information. * diff --git a/jdk/src/java.base/share/classes/java/security/KeyRep.java b/jdk/src/java.base/share/classes/java/security/KeyRep.java index f97208f1083..9d53635f7ce 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyRep.java +++ b/jdk/src/java.base/share/classes/java/security/KeyRep.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, 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 @@ -42,7 +42,7 @@ import javax.crypto.spec.SecretKeySpec; * * Note that a serialized Key may contain sensitive information * which should not be exposed in untrusted environments. See the - * + * * Security Appendix * of the Serialization Specification for more information. * diff --git a/jdk/src/java.base/share/specs/serialization/output.md b/jdk/src/java.base/share/specs/serialization/output.md index 944abbbc0dd..46b47cc45e6 100644 --- a/jdk/src/java.base/share/specs/serialization/output.md +++ b/jdk/src/java.base/share/specs/serialization/output.md @@ -221,7 +221,8 @@ object is serialized as follows: If the replacement object is not one of the types covered by Steps 3 through 7, processing resumes using the replacement object at Step 10. -9. If the object is a `java.lang.String,` the string is written as length +9. + If the object is a `java.lang.String,` the string is written as length information followed by the contents of the string encoded in modified UTF-8. For details, refer to [Section 6.2, "Stream Elements"](protocol.html#stream-elements). A handle is assigned to the diff --git a/jdk/src/java.management/share/classes/java/lang/management/package.html b/jdk/src/java.management/share/classes/java/lang/management/package.html index 67246f00e1e..f1d22738272 100644 --- a/jdk/src/java.management/share/classes/java/lang/management/package.html +++ b/jdk/src/java.management/share/classes/java/lang/management/package.html @@ -1,5 +1,5 @@ + + + + + + +@HEADER_TITLE@ + + + +

      @HEADER_TITLE@

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Modules
      GroupJava SEJDKJavaFX
      Foundation@CORE_MODULES@
      Security@SECURITY_MODULES@
      Instrumentation and
      Management
      @INSTRUMENT_MGMT_MODULES@
      Integration@INTEGRATION_MODULES@
      User Interface@UI_TOOLKITS_MODULES@
      Compiler and Scripting@COMPILER_SCRIPTING_MODULES@
      Debugging@DEBUG_MODULES@
      Tools and Tool APIs@TOOL_MODULES@
      Incubating Features@INCUBATOR_MODULES@
      Java EE@JAVA_EE_MODULES@
      Outside Java SEJDKJavaFX
      Others@OTHER_MODULES@
      + +

      +


      +Copyright© 1993, 2017, Oracle and/or its affiliates. All rights reserved.

      + + diff --git a/jdk/make/src/classes/build/tools/docs/docs-module-groups.properties b/jdk/make/src/classes/build/tools/docs/docs-module-groups.properties new file mode 100644 index 00000000000..0e7d0c8aed1 --- /dev/null +++ b/jdk/make/src/classes/build/tools/docs/docs-module-groups.properties @@ -0,0 +1,101 @@ +# Module Grouping for the docs bundle page +# + +core_modules=\ +java.base \ +jdk.charsets \ +jdk.localedata \ +jdk.net \ +jdk.sctp \ +jdk.zipfs + +java_ee_modules=\ +java.activation \ +java.corba \ +java.transaction \ +java.xml.bind \ +java.xml.ws \ +java.xml.ws.annotation + +security_modules=\ +java.security.jgss \ +java.security.sasl \ +java.xml.crypto \ +jdk.security.auth \ +jdk.security.jgss \ +jdk.crypto.cryptoki \ +jdk.crypto.ec \ +jdk.crypto.mscapi \ +jdk.crypto.ucrypto + +instrument_mgmt_modules=\ +java.instrument \ +java.management \ +java.management.rmi \ +jdk.jfr \ +jdk.management \ +jdk.management.agent \ +jdk.management.cmm \ +jdk.management.jfr \ +jdk.management.resource \ + +integration_modules=\ +java.logging \ +java.naming \ +java.prefs \ +java.rmi \ +java.sql \ +java.sql.rowset \ +java.xml \ +jdk.httpserver \ +jdk.naming.dns \ +jdk.naming.rmi + +ui_toolkits_modules=\ +java.datatransfer \ +java.desktop \ +javafx.base \ +javafx.controls \ +javafx.fxml \ +javafx.graphics \ +javafx.media \ +javafx.swing \ +javafx.web \ +jdk.accessibility + +other_modules=\ +java.jnlp \ +java.smartcardio \ +jdk.jsobject \ +jdk.xml.dom + +debug_modules=\ +jdk.jdi \ +jdk.jdwp.agent + +tool_modules=\ +jdk.attach \ +jdk.editpad \ +jdk.jartool \ +jdk.javadoc \ +jdk.jcmd \ +jdk.jconsole \ +jdk.jdeps \ +jdk.jlink \ +jdk.jshell \ +jdk.jstatd \ +jdk.pack \ +jdk.policytool \ +jdk.packager.services \ +jdk.rmic + +compiler_scripting_modules=\ +java.compiler \ +java.scripting \ +jdk.compiler \ +jdk.dynalink \ +jdk.scripting.nashorn \ +jdk.scripting.nashorn.shell + +incubator_modules=\ +jdk.incubator.httpclient From 999aabdd77e8a322b12cd4a618a666180b25a7b6 Mon Sep 17 00:00:00 2001 From: Ron Pressler Date: Fri, 12 May 2017 13:43:06 -0700 Subject: [PATCH 21/26] 8180075: Javadoc of MethodHandles.Lookup::bind should note the difference from MethodHandle::bindTo Reviewed-by: psandoz --- .../share/classes/java/lang/invoke/MethodHandles.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java index 292fd9bb6c4..d53d9d4ecca 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java @@ -1660,7 +1660,7 @@ assertEquals(""+l, (String) MH_this.invokeExact(subl)); // Listie method * (If the trailing array argument is the only argument, * the given receiver value will be bound to it.) *

      - * This is equivalent to the following code: + * This is almost equivalent to the following code, with some differences noted below: *

      {@code
       import static java.lang.invoke.MethodHandles.*;
       import static java.lang.invoke.MethodType.*;
      @@ -1673,7 +1673,10 @@ return mh1;
                * where {@code defc} is either {@code receiver.getClass()} or a super
                * type of that class, in which the requested method is accessible
                * to the lookup class.
      -         * (Note that {@code bindTo} does not preserve variable arity.)
      +         * (Unlike {@code bind}, {@code bindTo} does not preserve variable arity.
      +         * Also, {@code bindTo} may throw a {@code ClassCastException} in instances where {@code bind} would
      +         * throw an {@code IllegalAccessException}, as in the case where the member is {@code protected} and
      +         * the receiver is restricted by {@code findVirtual} to the lookup class.)
                * @param receiver the object from which the method is accessed
                * @param name the name of the method
                * @param type the type of the method, with the receiver argument omitted
      
      From 44bdf50a3a65181713ce66616249c185b4e296cf Mon Sep 17 00:00:00 2001
      From: Stuart Marks 
      Date: Fri, 12 May 2017 14:52:26 -0700
      Subject: [PATCH 22/26] 8180137: fix broken link in java.lang.Iterable
      
      Reviewed-by: rriggs
      ---
       jdk/src/java.base/share/classes/java/lang/Iterable.java | 9 +++------
       1 file changed, 3 insertions(+), 6 deletions(-)
      
      diff --git a/jdk/src/java.base/share/classes/java/lang/Iterable.java b/jdk/src/java.base/share/classes/java/lang/Iterable.java
      index 89059022905..a58faa4b250 100644
      --- a/jdk/src/java.base/share/classes/java/lang/Iterable.java
      +++ b/jdk/src/java.base/share/classes/java/lang/Iterable.java
      @@ -31,16 +31,13 @@ import java.util.Spliterators;
       import java.util.function.Consumer;
       
       /**
      - * Implementing this interface allows an object to be the target of
      - * the "for-each loop" statement. See
      - * 
      - * For-each Loop
      - * 
      + * Implementing this interface allows an object to be the target of the enhanced
      + * {@code for} statement (sometimes called the "for-each loop" statement).
        *
        * @param  the type of elements returned by the iterator
        *
        * @since 1.5
      - * @jls 14.14.2 The enhanced for statement
      + * @jls 14.14.2 The enhanced {@code for} statement
        */
       public interface Iterable {
           /**
      
      From 27770e6af7916c0e07866a099d2ca7e148abb55e Mon Sep 17 00:00:00 2001
      From: Roger Riggs 
      Date: Tue, 16 May 2017 09:42:38 -0400
      Subject: [PATCH 23/26] 8180319: Update Serialization spec to omit obsolete
       serialver -show and change history
      
      Reviewed-by: chegar
      ---
       .../share/specs/serialization/changelog.md    | 181 ------------------
       .../share/specs/serialization/class.md        |   8 +-
       .../specs/serialization/images/class.gif      | Bin 4139 -> 0 bytes
       .../share/specs/serialization/index.md        |   6 +-
       .../share/specs/serialization/security.md     |   6 +-
       .../share/specs/serialization/serial-arch.md  |   4 +-
       6 files changed, 8 insertions(+), 197 deletions(-)
       delete mode 100644 jdk/src/java.base/share/specs/serialization/changelog.md
       delete mode 100644 jdk/src/java.base/share/specs/serialization/images/class.gif
      
      diff --git a/jdk/src/java.base/share/specs/serialization/changelog.md b/jdk/src/java.base/share/specs/serialization/changelog.md
      deleted file mode 100644
      index 343dd5833ea..00000000000
      --- a/jdk/src/java.base/share/specs/serialization/changelog.md
      +++ /dev/null
      @@ -1,181 +0,0 @@
      ----
      -# Copyright (c) 2005, 2017, 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.
      -
      -include-before: '[CONTENTS](index.html) | [PREV](index.html) | [NEXT](serial-arch.html)'
      -include-after: '[CONTENTS](index.html) | [PREV](index.html) | [NEXT](serial-arch.html)'
      -
      -title: 'Java Object Serialization Specification: 0 - Change History'
      ----
      -
      --------------------------------------------------------------------------------
      -
      -May 12, 2005 Updates for Java^TM^ SE Development Kit, v6 Beta 1
      -
      --   Added statement about how an array object returned by a `readResolve`
      -    invocation for an unshared read is handled.
      --   Clarified the behavior in the event of an invalid `serialPersistentFields`
      -    value.
      --   Clarified that `serialVersionUID` matching is waived for array classes.
      --   Clarified when `IllegalArgumentException` is thrown by
      -    `ObjectOutputStream.PutFields` methods.
      -
      -July 24, 2003 Updates for Java^TM^ 2 SDK, Standard Edition, v1.5 Beta 1
      -
      --   Added support for serializing enum constants.
      --   Added specification of class modifier flags used in the computation of
      -    default `serialVersionUID` values to [Section 4.6, "Stream Unique
      -    Identifiers"](class.html#stream-unique-identifiers).
      -
      -Aug. 16, 2001 Updates for Java^TM^ 2 SDK, Standard Edition, v1.4 Beta 2
      -
      --   Added support for class-defined `readObjectNoData` methods, to be used for
      -    initializing serializable class fields in cases not covered by
      -    class-defined readObject methods. See [Section 3.5, "The readObjectNoData
      -    Method"](input.html#the-readobjectnodata-method), as well as Appendix A,
      -    "Security in Object Serialization".
      --   New methods `ObjectOutputStream.writeUnshared` and
      -    `ObjectInputStream.readUnshared` provide a mechanism for ensuring unique
      -    references to deserialized objects. See [Section 2.1, "The
      -    ObjectOutputStream Class"](output.html#the-objectoutputstream-class),
      -    [Section 3.1, "The ObjectInputStream
      -    Class"](input.html#the-objectinputstream-class), as well as Appendix A,
      -    "Security in Object Serialization".
      --   Documented new security checks in the one-argument constructors for
      -    `ObjectOutputStream` and `ObjectInputStream`. See [Section 2.1, "The
      -    ObjectOutputStream Class"](output.html#the-objectoutputstream-class) and
      -    [Section 3.1, "The ObjectInputStream
      -    Class"](input.html#the-objectinputstream-class).
      --   Added caution against using inner classes for serialization in [Section
      -    1.10, "The Serializable
      -    Interface"](serial-arch.html#the-serializable-interface).
      --   Clarified requirement that class-defined `writeObject` methods invoke
      -    `ObjectOutputStream.defaultWriteObject` or `writeFields` once before
      -    writing optional data, and that class-defined `readObject` methods invoke
      -    `ObjectInputStream.defaultReadObject` or `readFields` once before reading
      -    optional data. See [Section 2.3, "The writeObject
      -    Method"](output.html#the-writeobject-method) and [Section 3.4, "The
      -    readObject Method"](input.html#the-readobject-method).
      --   Clarified the behavior of `ObjectInputStream` when class-defined
      -    `readObject` or `readExternal` methods attempt read operations which exceed
      -    the bounds of available data; see [Section 3.4, "The readObject
      -    Method"](input.html#the-readobject-method) and [Section 3.6, "The
      -    readExternal Method"](input.html#the-readexternal-method).
      --   Clarified the description of non-proxy class descriptor field type strings
      -    to require that they be written in "field descriptor" format; see [Section
      -    6.2, "Stream Elements"](protocol.html#stream-elements).
      -
      -July 30, 1999 Updates for Java^TM^ 2 SDK, Standard Edition, v1.3 Beta
      -
      --   Added the ability to write `String` objects for which the UTF encoding is
      -    longer than 65535 bytes in length. See [Section 6.2, "Stream
      -    Elements"](protocol.html#stream-elements).
      --   New methods `ObjectOutputStream.writeClassDescriptor` and
      -    `ObjectInputStream.readClassDescriptor` provide a means of customizing the
      -    serialized representation of `ObjectStreamClass` class descriptors. See
      -    [Section 2.1, "The ObjectOutputStream
      -    Class"](output.html#the-objectoutputstream-class) and [Section 3.1, "The
      -    ObjectInputStream Class"](input.html#the-objectinputstream-class).
      --   Expanded Appendix A, "[Security in Object
      -    Serialization"](security.html#security-in-object-serialization).
      -
      -Sept. 30, 1998 Updates for JDK^TM^ 1.2 Beta4 RC1
      -
      --   Documentation corrections only.
      -
      -June 22, 1998 Updates for JDK^TM^ 1.2 Beta4
      -
      --   Eliminated JDK^TM^ 1.2 `java.io` interfaces, `Replaceable` and
      -    `Resolvable`.References to either of these classes as an interface should
      -    be replaced with `java.io.Serializable`. Serialization will use reflection
      -    to invoke the methods, `writeReplace` and `readResolve`, if the
      -    Serializable class defines these methods. See [Section 2.5, "The
      -    writeReplace Method"](output.html#the-writereplace-method) and [Section
      -    3.7, "The readResolve Method"](input.html#the-readresolve-method).
      --   New javadoc tags *@serial*, *@serialField*, and *@serialData* provide a way
      -    to document the Serialized Form of a Serializable class. Javadoc generates
      -    a serialization specification based on the contents of these tags. See
      -    [Section 1.6, "Documenting Serializable Fields and Data for a
      -    Class"](serial-arch.html#documenting-serializable-fields-and-data-for-a-class).
      --   Special Serializable class member, `serialPersistentFields`, must be
      -    declared private. See [Section 1.5, "Defining Serializable Fields for a
      -    Class"](serial-arch.html#defining-serializable-fields-for-a-class).
      --   Clarified the steps involved in computing the `serialVersionUID` in
      -    [Section 4.6, "Stream Unique
      -    Identifiers"](class.html#stream-unique-identifiers).
      -
      -Feb. 6, 1998 Updates for JDK^TM^ 1.2 Beta 3
      -
      --   Introduced the concept of `STREAM_PROTOCOL` versions. Added the
      -    `STREAM_PROTOCOL_2` version to indicate a new format for `Externalizable`
      -    objects that enable skipping by an `Externalizable` object within the
      -    stream, even when the object's class is not available in the local Virtual
      -    Machine. Compatibility issues are discussed in [Section 6.3, "Stream
      -    Protocol Versions"](protocol.html#stream-protocol-versions).
      --   `The ObjectInputStream.resolveClass` method can return a local class in a
      -    different package than the name of the class within the stream. This
      -    capability enables renaming of packages between releases. The
      -    `serialVersionUID` and the base class name must be the same in the stream
      -    and in the local version of the class. See [Section 3.1, "The
      -    ObjectInputStream Class"](input.html#the-objectinputstream-class).
      --   Allow substitution of `String` or `array` objects when writing them to or
      -    reading them from the stream. See [Section 2.1, "The ObjectOutputStream
      -    Class"](output.html#the-objectoutputstream-class) and [Section 3.1, "The
      -    ObjectInputStream Class"](input.html#the-objectinputstream-class).
      -
      -Sept. 4, 1997 Updates for JDK^TM^ 1.2 Beta1
      -
      --   Separated the Replaceable interface into two interfaces: Replaceable and
      -    Resolvable. The Replaceable interface allows a class to nominate its own
      -    replacement just before serializing the object to the stream. The
      -    Resolvable interface allows a class to nominate its own replacement when
      -    reading an object from the stream.
      --   Modified serialization to use the JDK^TM^ 1.2 security model. There is a
      -    check for `SerializablePermission "enableSubstitution"` within the
      -    `ObjectInputStream.enableReplace` and `ObjectOutputStream.enableResolve`
      -    methods. See [Section 2.1, "The ObjectOutputStream
      -    Class"](output.html#the-objectoutputstream-class) and [Section 3.1, "The
      -    ObjectInputStream Class"](input.html#the-objectinputstream-class).
      --   Updated `writeObject`'s exception handler to write handled `IOException`s
      -    into the stream. See [Section 2.1, "The ObjectOutputStream
      -    Class"](output.html#the-objectoutputstream-class).
      -
      -July 3, 1997 Updates for JDK^TM^ 1.2 Alpha
      -
      --   Documented the requirements for specifying the serialized state of classes.
      -    See [Section 1.5, "Defining Serializable Fields for a
      -    Class"](serial-arch.html#defining-serializable-fields-for-a-class).
      --   Added the Serializable Fields API to allow classes more flexibility in
      -    accessing the serialized fields of a class. The stream protocol is
      -    unchanged. See [Section 1.7, "Accessing Serializable Fields of a
      -    Class](serial-arch.html#accessing-serializable-fields-of-a-class),"
      -    [Section 2.2, "The ObjectOutputStream.PutField
      -    Class](output.html#the-objectoutputstream.putfield-class)," and [Section
      -    3.2, "The ObjectInputStream.GetField
      -    Class"](input.html#the-objectinputstream.getfield-class).
      --   Clarified that field descriptors and data are written to and read from the
      -    stream in canonical order. See [Section 4.1, "The ObjectStreamClass
      -    Class"](class.html#the-objectstreamclass-class).
      -
      --------------------------------------------------------------------------------
      -
      -*[Copyright](../../../legal/SMICopyright.html) © 2005, 2017, Oracle
      -and/or its affiliates. All rights reserved.*
      diff --git a/jdk/src/java.base/share/specs/serialization/class.md b/jdk/src/java.base/share/specs/serialization/class.md
      index 5393b0bc6c3..03b94b7d099 100644
      --- a/jdk/src/java.base/share/specs/serialization/class.md
      +++ b/jdk/src/java.base/share/specs/serialization/class.md
      @@ -241,13 +241,7 @@ The `toString` method returns a printable representation with name and type.
       ## 4.5 Inspecting Serializable Classes
       
       The program *serialver* can be used to find out if a class is serializable and
      -to get its `serialVersionUID`. When invoked with the-show option, it puts up a
      -simple user interface. To find out if a class is serializable and to find out
      -its *serialVersionUID*`,` enter its full class name, then press either the
      -Enter or the Show button. The string printed can be copied and pasted into the
      -evolved class.
      -
      ->   ![*serialver, Serial Version Inspector program*](images/class.gif)
      +to get its `serialVersionUID`. 
       
       When invoked on the command line with one or more class names, serialver prints
       the `serialVersionUID` for each class in a form suitable for copying into an
      diff --git a/jdk/src/java.base/share/specs/serialization/images/class.gif b/jdk/src/java.base/share/specs/serialization/images/class.gif
      deleted file mode 100644
      index 15b4bf80c59c233a29144f0d5fb44ff9ce27f2b3..0000000000000000000000000000000000000000
      GIT binary patch
      literal 0
      HcmV?d00001
      
      literal 4139
      zcmeH{`8yPB)W>gBh7e_$=FzG$(Nj{{l1F7NNvSMJmh8$FX2w{?He+c_WLC!5X2ue-
      z4rL;eJ+i0Llgd__5N0r5p7&pPe|*mm=eqB6o$u$|=Umr)OwCPnw4F6X5nu^ynz_z>
      zKR>@1x8~&Jk|_b>+9ojSClmSs>C0)D;210ALG3
      zy#R3E#3-(Vi02d3C
      z2_hRJs7_NbD7OM7KveIr#l4Lz5sM9)7-ysQPaquy6i);45~w@9Q60F80nUGv9bmEw
      z015y}Ktu+BVgN)oGyno%>cIVg&m
      zDa-qk6gf@FqUHBamq7p1C|hj`f&sAF5B}aDae?e-0Qf)~2Y3K%0YCr%Lu9jo$qN9?
      zgTosG;sKFXz!e3&yFjCO3m4YJb1y$OSpxS1Kms5D(Aa#^|J(n~1deTDHva;E2!R4b
      z*{qDw7z5d*=FnP}-Gr4@xs+k{Ea!C+^py99)@QkIQubd=R5mZqYfFP$7do_+=Xa1a
      zT-!6uE0|q0ouEXch6>hII*69sbE%Tun`@S)cBj3vppRvhdnxl$RpCI9ZH4#8_Nt{A8*gRT=T$Yi^u#nXp;5``<%KmM_?NWE_
      z@3mRFQ)OWxS{Kem0{K$)3ojbhWu<1i072
      zX?KWxcrrpwQZ?6|DPhYb7n*yp(gGz4a!n64(gzCE-QNzqO8$&I5$b7rZN7gM!R~@vHA3#
      zS7E>FVQ=;4i5~-3%9yY8KAdVbF3^A2xuZfoFGqg}HPfg!WAW^Q;!5Z+_nODkDpxtb
      zpJ!aGRc}<;>4q%+8S#AU6ZGD9WxHY5X~&O?A07_fuW@o#IUORj6Soo{`xqsDoHK~r
      zSGn{Vr&_`piu>!~@)v^Xab(3KrG@3MWRH^C49L1%_mg?_!e3jQ6xm;%$1Y@kub!z`wo$oO{v9{1}<5#~B
      z;#Ru0_#yPy+U+6iJ_Ft#6S$B+$tsNyY-~y43h&K{_0@$TzxB1{iPCl9>e8=`#Vy4E
      z;${t^FpVf+n94J*EMQmkc?gvN!Tn
      zwA8N&cx51U}02M!1^JC}CJM0~|JdscS440TPzIfdV
      z-go(%8bw>)#l%0o=?O#KBSFqx%Nky`i}p9m{0i=KD!Ji?qh?=Chsvv-V}(*Itt_m?
      zjlI_7OAim5W_ZbkaLcK@WY(F;Wm8u@KiZ^lhN(P7?l?&e$^ccWy4QBg`$|?YmW)_h
      za(b4rn*CrT7OwWuLudG!FA@5;g9(LST_F8B5Fg`i>YC828z@hmvzR(qy4%XtKt4zE
      z&&1rqR5wAONnToI8QpHT4pVzbUiO6>x=#1V!Tw~u%43fcl)6H>6?yxEy-g@;H#?pM
      z6<#@W^k#P9yAtN(e2pufhADM@Ud}9k2MxH%j&ezE>zn$(%Zbv}>ceoM5@u`&jL0@4<5A%QK$N
      zSSAF%eKD(mgol4KpRc~wBwGE%E?CI)DJmR(f1F5vtn7Mc53S)7@g~x9&E2l~s8#PL
      zg>wC^(}qgak?(lLFy{S2ACEBm>Akm#P)Sc6#ggntQ6y~gz|_@$r$?Q))et@x@4Z8r
      zallZk>R&$kW!onB^c`-|`GSE6W4`0iHWo^M4VTUW;l1{a<~nC6Jgu)E9Lfbvg9
      zzx)R-TaM`=vgwCCk!M#%h=Gf>QnNpdB&@FWZzDGx{F_%%GCCxT=nqoe>!0M2@fp^!
      zrTDe{39T_|=lr5(eX*40%G_nwbY+f;Y4x+zo8?Z21)Oq2#quYmEHmB2LsbVF=Td7v
      zq#o(xwdGg-c=AU1TyP-2)02o3k~|>pO_bD5|Gg@Y`z$8()bDj^`c_=YRh}>yCpCx2
      zR5Er%Pe@FU6uK;)%IMOcG|8&%*{OdzdDqj)lc(PIlB-X`t6HZl!vuW{nLn&?^1WU2
      zweRkgFm~81GSy|s`^MM)S{ZIV5^R6%
      zXukT#J(Mdq!b`lp
      z`UU!y)1uw|8y}YO`F`b6p78g%0CVE%SNPT1_LE5C$2*8$)z{|~T`lLSqpRNse01HK
      zq=GU|SP=|%)b(Hu0x~Zux9?OHy!9wqV4hu@vept9j7bIm7O9`MeOou^0snKIwlI1-
      z<US@u6fJ#m?9aQj@MbSzWP5B*U-saTZ-B8wKRJFN;~=qkv?GPzgIdmKnnq4N%R+xA
      zIr15#b#yvym3O&v^^Hd)9_vt66Uw!@`#m(QX(+Nk6wRGLD-lCG&P3@ABHm*keyB0z
      zVQ;*+iIHEn{_b%%Q{1KD^+V!P)LwYFIKt|&Li9niP??s<+yPAUo2dQph`-J5ZimOf
      zT99s9m_y{K0OOcgT=whjw5`bw=q<}A#VY4o{o(dW&g=Bm(2OvE;`
      z$O}-k3^ayd6C>>&3-Js!WyjciB8;H%x8U)^L8!cem@^!d{;+M38`{PUgT%Hc^5(i1W~lb(zcSBCCois
      zv=+jF)EZXg8Bh9#@r5V$EZgqU3U3>5^gu)@EXTV-v5&=*`mph1kl6l76c>&^3Q3$8
      zj=e+~bw%|a8^$SDVoVE-VJO%V|%T3xqzI=ofF
      zPq*S{a53Rf0@^cKzBb9t76G9Ux_8AT>clN@kc4GifKIefJ5r=Iv9m9waZBV+B_ZyY
      zN9;NWD~(GPtBs@IOx;I}N}EjMKnNK_5ksxGLnF>h;_;=!coz=l)0@~L7RsU^Uc)P`
      zM=W*5BsrX9e1wz!ax&ei&G$Ywed$Q5^Hi#H%@gNZqM9jD#e?XSK=jomJ>2d0fFI~T
      zl^$qELXVIlLP$&^>2@tC!j2r@b}5PS}2(Mrd3=Dhsh03>0JeAp)qnnoRD9CTN)@o_YM+H1^M=?FAOz%3TuRy^?a=#{3
      zt-F``(4G~7Vj-xkzyqwV$6gTvRuqgKt;gOIYtN2Hv2j#(VjVmAJsU4z6JQ0YdIe7;
      KjYUMj+5Z7Z0Atkv
      
      diff --git a/jdk/src/java.base/share/specs/serialization/index.md b/jdk/src/java.base/share/specs/serialization/index.md
      index c254405c8ed..1ad49f7cbdc 100644
      --- a/jdk/src/java.base/share/specs/serialization/index.md
      +++ b/jdk/src/java.base/share/specs/serialization/index.md
      @@ -20,8 +20,8 @@
       # or visit www.oracle.com if you need additional information or have any
       # questions.
       
      -include-before: 'CONTENTS | PREV | [NEXT](changelog.html)'
      -include-after: 'CONTENTS | PREV | [NEXT](changelog.html)'
      +include-before: 'CONTENTS | PREV | [NEXT](serial-arch.html)'
      +include-after: 'CONTENTS | PREV | [NEXT](serial-arch.html)'
       
       title: 'Java Object Serialization Specification: Contents'
       ---
      @@ -30,8 +30,6 @@ title: 'Java Object Serialization Specification: Contents'
       
       ## Table of Contents
       
      -### 0 [Change History](changelog.html)
      -
       ### 1 [System Architecture](serial-arch.html)
       
       -   1.1 [Overview](serial-arch.html#overview)
      diff --git a/jdk/src/java.base/share/specs/serialization/security.md b/jdk/src/java.base/share/specs/serialization/security.md
      index 14848f080b1..9f26748daa9 100644
      --- a/jdk/src/java.base/share/specs/serialization/security.md
      +++ b/jdk/src/java.base/share/specs/serialization/security.md
      @@ -28,9 +28,9 @@ title: 'Java Object Serialization Specification: A - Security in Object Serializ
       
       -------------------------------------------------------------------------------
       
      -Refer to the [Secure Coding Guidelines for the Java Programming
      -Language](http://www.oracle.com/technetwork/java/seccodeguide-139067.html) for
      -information about security in object serialization.
      +Refer to the [Secure Coding Guidelines for the Java Programming 
      +Language](http://www.oracle.com/pls/topic/lookup?ctx=javase9&id=secure_coding_guidelines_javase) 
      +for information about security in object serialization.
       
       -------------------------------------------------------------------------------
       
      diff --git a/jdk/src/java.base/share/specs/serialization/serial-arch.md b/jdk/src/java.base/share/specs/serialization/serial-arch.md
      index 0cfe94993ea..4ff54731688 100644
      --- a/jdk/src/java.base/share/specs/serialization/serial-arch.md
      +++ b/jdk/src/java.base/share/specs/serialization/serial-arch.md
      @@ -20,8 +20,8 @@
       # or visit www.oracle.com if you need additional information or have any
       # questions.
       
      -include-before: '[CONTENTS](index.html) | [PREV](changelog.html) | [NEXT](output.html)'
      -include-after: '[CONTENTS](index.html) | [PREV](changelog.html) | [NEXT](output.html)'
      +include-before: '[CONTENTS](index.html) | [PREV](index.html) | [NEXT](output.html)'
      +include-after: '[CONTENTS](index.html) | [PREV](index.html) | [NEXT](output.html)'
       
       title: 'Java Object Serialization Specification: 1 - System Architecture'
       ---
      
      From 3080f4509d598789685f4d3d670ef9761293d32b Mon Sep 17 00:00:00 2001
      From: Brian Burkhalter 
      Date: Tue, 16 May 2017 14:11:48 -0700
      Subject: [PATCH 24/26] 8180431: Remove intermittent keyword from some no
       longer failing NIO tests
      
      Remove "intermittent" keyword from @key tag,
      
      Reviewed-by: alanb
      ---
       jdk/test/java/nio/channels/Selector/SelectAndClose.java   | 1 -
       jdk/test/java/nio/channels/Selector/WakeupAfterClose.java | 1 -
       2 files changed, 2 deletions(-)
      
      diff --git a/jdk/test/java/nio/channels/Selector/SelectAndClose.java b/jdk/test/java/nio/channels/Selector/SelectAndClose.java
      index 9c1673b7f40..747afbedbae 100644
      --- a/jdk/test/java/nio/channels/Selector/SelectAndClose.java
      +++ b/jdk/test/java/nio/channels/Selector/SelectAndClose.java
      @@ -23,7 +23,6 @@
       
       /* @test
        * @bug 5004077
      - * @key intermittent
        * @summary Check blocking of select and close
        */
       
      diff --git a/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java b/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java
      index da4c806460e..92b1aef5c6d 100644
      --- a/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java
      +++ b/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java
      @@ -24,7 +24,6 @@
       /* @test
        * @bug 6524172
        * @summary Invoking wakeup on closed Selector can throw NPE if close resets interrupt status
      - * @key intermittent
        */
       
       import java.io.IOException;
      
      From 4dbd43322dd2544b2cd9740fe432e628a8b92c9a Mon Sep 17 00:00:00 2001
      From: Joe Darcy 
      Date: Tue, 16 May 2017 18:23:21 -0700
      Subject: [PATCH 25/26] 8180452: Mark ClipCloseLoss.java as failing
       intermittently
      
      Reviewed-by: serb
      ---
       jdk/test/javax/sound/sampled/Clip/ClipCloseLoss.java | 1 +
       1 file changed, 1 insertion(+)
      
      diff --git a/jdk/test/javax/sound/sampled/Clip/ClipCloseLoss.java b/jdk/test/javax/sound/sampled/Clip/ClipCloseLoss.java
      index 24226ddd125..56b046163b0 100644
      --- a/jdk/test/javax/sound/sampled/Clip/ClipCloseLoss.java
      +++ b/jdk/test/javax/sound/sampled/Clip/ClipCloseLoss.java
      @@ -36,6 +36,7 @@ import javax.sound.sampled.Mixer;
        * @bug 4946913
        * @summary DirectClip doesn't kill the thread correctly, sometimes
        * @run main/othervm ClipCloseLoss
      + * @key intermittent
        */
       public class ClipCloseLoss {
           static int frameCount = 441000; // lets say 10 seconds
      
      From a99fc645d64cf4f16db2fd690c6d78504e2cd38f Mon Sep 17 00:00:00 2001
      From: Sean Mullan 
      Date: Wed, 17 May 2017 08:51:46 -0400
      Subject: [PATCH 26/26] 8180307: Update JDK 9 Required Cipher Algorithms
      
      Reviewed-by: valeriep
      ---
       jdk/src/java.base/share/classes/javax/crypto/Cipher.java | 1 +
       1 file changed, 1 insertion(+)
      
      diff --git a/jdk/src/java.base/share/classes/javax/crypto/Cipher.java b/jdk/src/java.base/share/classes/javax/crypto/Cipher.java
      index cf288f5f1da..4068483470c 100644
      --- a/jdk/src/java.base/share/classes/javax/crypto/Cipher.java
      +++ b/jdk/src/java.base/share/classes/javax/crypto/Cipher.java
      @@ -137,6 +137,7 @@ import sun.security.jca.*;
        * 
    • {@code AES/CBC/PKCS5Padding} (128)
    • *
    • {@code AES/ECB/NoPadding} (128)
    • *
    • {@code AES/ECB/PKCS5Padding} (128)
    • + *
    • {@code AES/GCM/NoPadding} (128)
    • *
    • {@code DES/CBC/NoPadding} (56)
    • *
    • {@code DES/CBC/PKCS5Padding} (56)
    • *
    • {@code DES/ECB/NoPadding} (56)