8325189: Enable this-escape javac warning in java.base

Reviewed-by: alanb, erikj, naoto, smarks, ihse, joehw, lancea, weijun
This commit is contained in:
Joe Darcy 2024-02-07 20:05:11 +00:00
parent 299a8ee68d
commit fbd15b2087
93 changed files with 151 additions and 2 deletions

View file

@ -89,6 +89,7 @@ public class DigestInputStream extends FilterInputStream {
*
* @param digest the message digest to associate with this stream.
*/
@SuppressWarnings("this-escape")
public DigestInputStream(InputStream stream, MessageDigest digest) {
super(stream);
setMessageDigest(digest);

View file

@ -67,6 +67,7 @@ public class DigestOutputStream extends FilterOutputStream {
*
* @param digest the message digest to associate with this stream.
*/
@SuppressWarnings("this-escape")
public DigestOutputStream(OutputStream stream, MessageDigest digest) {
super(stream);
setMessageDigest(digest);

View file

@ -116,6 +116,7 @@ public abstract class Identity implements Principal, Serializable {
* @throws KeyManagementException if there is already an {@code Identity}
* with the same name in the scope.
*/
@SuppressWarnings("this-escape")
public Identity(String name, IdentityScope scope) throws
KeyManagementException {
this(name);

View file

@ -187,6 +187,7 @@ public abstract class Provider extends Properties {
* @deprecated use {@link #Provider(String, String, String)} instead.
*/
@Deprecated(since="9")
@SuppressWarnings("this-escape")
protected Provider(String name, double version, String info) {
this.name = name;
this.version = version;
@ -227,6 +228,7 @@ public abstract class Provider extends Properties {
*
* @since 9
*/
@SuppressWarnings("this-escape")
protected Provider(String name, String versionStr, String info) {
this.name = name;
this.versionStr = versionStr;

View file

@ -98,6 +98,7 @@ public class PKIXBuilderParameters extends PKIXParameters {
* {@code trustAnchors} are not of type
* {@code java.security.cert.TrustAnchor}
*/
@SuppressWarnings("this-escape")
public PKIXBuilderParameters(Set<TrustAnchor> trustAnchors, CertSelector
targetConstraints) throws InvalidAlgorithmParameterException
{
@ -123,6 +124,7 @@ public class PKIXBuilderParameters extends PKIXParameters {
* @throws NullPointerException if {@code keystore} is
* {@code null}
*/
@SuppressWarnings("this-escape")
public PKIXBuilderParameters(KeyStore keystore,
CertSelector targetConstraints)
throws KeyStoreException, InvalidAlgorithmParameterException

View file

@ -114,6 +114,7 @@ public class PKIXParameters implements CertPathParameters {
* @throws ClassCastException if any of the elements in the {@code Set}
* are not of type {@code java.security.cert.TrustAnchor}
*/
@SuppressWarnings("this-escape")
public PKIXParameters(Set<TrustAnchor> trustAnchors)
throws InvalidAlgorithmParameterException
{
@ -138,6 +139,7 @@ public class PKIXParameters implements CertPathParameters {
* not contain at least one trusted certificate entry
* @throws NullPointerException if the keystore is {@code null}
*/
@SuppressWarnings("this-escape")
public PKIXParameters(KeyStore keystore)
throws KeyStoreException, InvalidAlgorithmParameterException
{