Skip to content

Commit

Permalink
8285400: Add '@APinote' to the APIs defined in Java SE 8 MR 3
Browse files Browse the repository at this point in the history
Reviewed-by: mchung, iris, andrew
Backport-of: 3740d05c063e1f80a0808a969a2cc136cafa48cb
  • Loading branch information
Poonam Bajaj committed Aug 22, 2022
1 parent 3a5b2cd commit 8ad9018
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 16 deletions.
4 changes: 1 addition & 3 deletions jdk/src/share/classes/java/security/Signature.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2022, 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
Expand Down Expand Up @@ -591,8 +591,6 @@ public final void initVerify(Certificate certificate)
* is not encoded properly or does not include required parameter
* information or cannot be used for digital signature purposes.
* @exception InvalidAlgorithmParameterException if the params is invalid.
*
* @since 8
*/
final void initVerify(Certificate certificate,
AlgorithmParameterSpec params)
Expand Down
3 changes: 2 additions & 1 deletion jdk/src/share/classes/java/security/interfaces/RSAKey.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2022, 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
Expand Down Expand Up @@ -56,6 +56,7 @@ public interface RSAKey {
* explicitly specified or implicitly created during
* key pair generation.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @implSpec
* The default implementation returns {@code null}.
*
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, 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
Expand Down Expand Up @@ -98,12 +98,18 @@ public class MGF1ParameterSpec implements AlgorithmParameterSpec {

/**
* The MGF1ParameterSpec which uses SHA-512/224 message digest
*
* @apiNote This field is defined in Java SE 8 Maintenance Release 3.
* @since 8
*/
public static final MGF1ParameterSpec SHA512_224 =
new MGF1ParameterSpec("SHA-512/224");

/**
* The MGF1ParameterSpec which uses SHA-512/256 message digest
*
* @apiNote This field is defined in Java SE 8 Maintenance Release 3.
* @since 8
*/
public static final MGF1ParameterSpec SHA512_256 =
new MGF1ParameterSpec("SHA-512/256");
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2022, 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
Expand Down Expand Up @@ -96,6 +96,7 @@ public class PSSParameterSpec implements AlgorithmParameterSpec {
/**
* The {@code TrailerFieldBC} constant as defined in PKCS#1
*
* @apiNote This field is defined in Java SE 8 Maintenance Release 3.
* @since 8
*/
public static final int TRAILER_FIELD_BC = 1;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2022, 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
Expand Down Expand Up @@ -70,6 +70,7 @@ public RSAKeyGenParameterSpec(int keysize, BigInteger publicExponent) {
* Constructs a new {@code RSAKeyGenParameterSpec} object from the
* given keysize, public-exponent value, and key parameters.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @param keysize the modulus size (specified in number of bits)
* @param publicExponent the public exponent
* @param keyParams the key parameters, may be null
Expand Down Expand Up @@ -103,6 +104,7 @@ public BigInteger getPublicExponent() {
/**
* Returns the parameters to be associated with key.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @return the associated parameters, may be null if
* not present
* @since 8
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2022, 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
Expand Down Expand Up @@ -104,6 +104,7 @@ public RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus,
* are copied to protect against subsequent modification when
* constructing this object.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @param modulus the modulus n
* @param publicExponent the public exponent e
* @param privateExponent the private exponent d
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2022, 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
Expand Down Expand Up @@ -81,6 +81,7 @@ public RSAPrivateCrtKeySpec(BigInteger modulus,
* Creates a new {@code RSAPrivateCrtKeySpec} with additional
* key parameters.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @param modulus the modulus n
* @param publicExponent the public exponent e
* @param privateExponent the private exponent d
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2022, 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
Expand Down Expand Up @@ -60,6 +60,7 @@ public RSAPrivateKeySpec(BigInteger modulus, BigInteger privateExponent) {
/**
* Creates a new RSAPrivateKeySpec with additional key parameters.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @param modulus the modulus
* @param privateExponent the private exponent
* @param params the parameters associated with this key, may be null
Expand Down Expand Up @@ -94,6 +95,7 @@ public BigInteger getPrivateExponent() {
* Returns the parameters associated with this key, may be null if not
* present.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @return the parameters associated with this key
* @since 8
*/
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2022, 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
Expand Down Expand Up @@ -60,6 +60,7 @@ public RSAPublicKeySpec(BigInteger modulus, BigInteger publicExponent) {
/**
* Creates a new RSAPublicKeySpec with additional key parameters.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @param modulus the modulus
* @param publicExponent the public exponent
* @param params the parameters associated with this key, may be null
Expand Down Expand Up @@ -95,6 +96,7 @@ public BigInteger getPublicExponent() {
* Returns the parameters associated with this key, may be null if not
* present.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @return the parameters associated with this key
* @since 8
*/
Expand Down
8 changes: 6 additions & 2 deletions jdk/src/share/classes/javax/net/ssl/SSLEngine.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, 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
Expand Down Expand Up @@ -1265,6 +1265,7 @@ public void setSSLParameters(SSLParameters params) {
* Application-Layer Protocol Negotiation (ALPN), can negotiate
* application-level values between peers.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @implSpec
* The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action.
Expand All @@ -1290,6 +1291,7 @@ public String getApplicationProtocol() {
* a connection may be in the middle of a handshake. The
* application protocol may or may not yet be available.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @implSpec
* The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action.
Expand Down Expand Up @@ -1350,7 +1352,8 @@ public String getHandshakeApplicationProtocol() {
* });
* }</pre>
*
* @apiNote
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* <p>
* This method should be called by TLS server applications before the TLS
* handshake begins. Also, this {@code SSLEngine} should be configured with
* parameters that are compatible with the application protocol selected by
Expand Down Expand Up @@ -1380,6 +1383,7 @@ public void setHandshakeApplicationProtocolSelector(
* setHandshakeApplicationProtocolSelector}
* for the function's type parameters.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @implSpec
* The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action.
Expand Down
4 changes: 3 additions & 1 deletion jdk/src/share/classes/javax/net/ssl/SSLParameters.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2022, 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
Expand Down Expand Up @@ -486,6 +486,7 @@ public final boolean getUseCipherSuitesOrder() {
* <p>
* This method will return a new array each time it is invoked.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @return a non-null, possibly zero-length array of application protocol
* {@code String}s. The array is ordered based on protocol
* preference, with {@code protocols[0]} being the most preferred.
Expand Down Expand Up @@ -518,6 +519,7 @@ public String[] getApplicationProtocols() {
* action to take. (For example, ALPN will send a
* {@code "no_application_protocol"} alert and terminate the connection.)
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @implSpec
* This method will make a copy of the {@code protocols} array.
*
Expand Down
8 changes: 6 additions & 2 deletions jdk/src/share/classes/javax/net/ssl/SSLSocket.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022, 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
Expand Down Expand Up @@ -674,6 +674,7 @@ public void setSSLParameters(SSLParameters params) {
* Application-Layer Protocol Negotiation (ALPN), can negotiate
* application-level values between peers.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @implSpec
* The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action.
Expand All @@ -699,6 +700,7 @@ public String getApplicationProtocol() {
* a connection may be in the middle of a handshake. The
* application protocol may or may not yet be available.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @implSpec
* The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action.
Expand Down Expand Up @@ -760,7 +762,8 @@ public String getHandshakeApplicationProtocol() {
* });
* }</pre>
*
* @apiNote
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* <p>
* This method should be called by TLS server applications before the TLS
* handshake begins. Also, this {@code SSLSocket} should be configured with
* parameters that are compatible with the application protocol selected by
Expand Down Expand Up @@ -789,6 +792,7 @@ public void setHandshakeApplicationProtocolSelector(
* setHandshakeApplicationProtocolSelector}
* for the function's type parameters.
*
* @apiNote This method is defined in Java SE 8 Maintenance Release 3.
* @implSpec
* The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action.
Expand Down

1 comment on commit 8ad9018

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.