mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8325189
: Enable this-escape javac warning in java.base
Reviewed-by: alanb, erikj, naoto, smarks, ihse, joehw, lancea, weijun
This commit is contained in:
parent
299a8ee68d
commit
fbd15b2087
93 changed files with 151 additions and 2 deletions
|
@ -402,6 +402,7 @@ public class PKCS9Attribute implements DerEncoder {
|
|||
* @param derVal the DerValue representing the DER encoding of the attribute.
|
||||
* @exception IOException on parsing error.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PKCS9Attribute(DerValue derVal) throws IOException {
|
||||
|
||||
DerInputStream derIn = new DerInputStream(derVal.toByteArray());
|
||||
|
|
|
@ -59,6 +59,7 @@ public class CtrDrbg extends AbstractDrbg {
|
|||
private byte[] v;
|
||||
private byte[] k;
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public CtrDrbg(SecureRandomParameters params) {
|
||||
mechName = "CTR_DRBG";
|
||||
configure(params);
|
||||
|
|
|
@ -81,6 +81,7 @@ implements java.security.interfaces.DSAPublicKey, Serializable {
|
|||
* @param q DSA parameter q, may be null if all of p, q, and g are null.
|
||||
* @param g DSA parameter g, may be null if all of p, q, and g are null.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DSAPublicKey(BigInteger y, BigInteger p, BigInteger q,
|
||||
BigInteger g) {
|
||||
this.y = y;
|
||||
|
@ -95,6 +96,7 @@ implements java.security.interfaces.DSAPublicKey, Serializable {
|
|||
/**
|
||||
* Make a DSA public key from its DER encoding (X.509).
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DSAPublicKey(byte[] encoded) throws InvalidKeyException {
|
||||
decode(encoded);
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ public class HashDrbg extends AbstractHashDrbg {
|
|||
private byte[] v;
|
||||
private byte[] c;
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public HashDrbg(SecureRandomParameters params) {
|
||||
mechName = "Hash_DRBG";
|
||||
configure(params);
|
||||
|
|
|
@ -45,6 +45,7 @@ public class HmacDrbg extends AbstractHashDrbg {
|
|||
private byte[] v;
|
||||
private byte[] k;
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public HmacDrbg(SecureRandomParameters params) {
|
||||
mechName = "HMAC_DRBG";
|
||||
configure(params);
|
||||
|
|
|
@ -115,6 +115,7 @@ public class BitArray {
|
|||
* Create a BitArray whose bits are those of the given array
|
||||
* of Booleans.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public BitArray(boolean[] bits) {
|
||||
length = bits.length;
|
||||
repn = new byte[(length + 7)/8];
|
||||
|
|
|
@ -340,6 +340,7 @@ public class DerValue {
|
|||
*
|
||||
* This is a public constructor.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DerValue(byte[] encoding) throws IOException {
|
||||
this(encoding.clone(), 0, encoding.length, true, false);
|
||||
}
|
||||
|
@ -487,6 +488,7 @@ public class DerValue {
|
|||
* @param in the input stream holding a single DER datum,
|
||||
* which may be followed by additional data
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DerValue(InputStream in) throws IOException {
|
||||
this(in, true);
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ public class ValidatorException extends CertificateException {
|
|||
super(msg);
|
||||
}
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public ValidatorException(String msg, Throwable cause) {
|
||||
super(msg);
|
||||
initCause(cause);
|
||||
|
@ -85,8 +86,9 @@ public class ValidatorException extends CertificateException {
|
|||
this.cert = cert;
|
||||
}
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public ValidatorException(Object type, X509Certificate cert,
|
||||
Throwable cause) {
|
||||
Throwable cause) {
|
||||
this(type, cert);
|
||||
initCause(cause);
|
||||
}
|
||||
|
@ -97,6 +99,7 @@ public class ValidatorException extends CertificateException {
|
|||
this.cert = cert;
|
||||
}
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public ValidatorException(String msg, Object type, X509Certificate cert,
|
||||
Throwable cause) {
|
||||
this(msg, type, cert);
|
||||
|
|
|
@ -123,6 +123,7 @@ public class AlgorithmId implements Serializable, DerEncoder {
|
|||
* @param oid the identifier for the algorithm.
|
||||
* @param params the associated algorithm parameters, can be null.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public AlgorithmId(ObjectIdentifier oid, DerValue params)
|
||||
throws IOException {
|
||||
this.algid = oid;
|
||||
|
|
|
@ -52,6 +52,7 @@ public class GeneralNames {
|
|||
* @param derVal the DerValue to construct the GeneralNames from.
|
||||
* @exception IOException on error.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public GeneralNames(DerValue derVal) throws IOException {
|
||||
this();
|
||||
if (derVal.tag != DerValue.tag_Sequence) {
|
||||
|
|
|
@ -70,6 +70,7 @@ public class GeneralSubtrees implements Cloneable, DerEncoder {
|
|||
*
|
||||
* @param val the DER encoded form of the same.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public GeneralSubtrees(DerValue val) throws IOException {
|
||||
this();
|
||||
if (val.tag != DerValue.tag_Sequence) {
|
||||
|
|
|
@ -50,6 +50,7 @@ public class RFC822Name implements GeneralNameInterface
|
|||
* @param derValue the encoded DER RFC822Name.
|
||||
* @exception IOException on error.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public RFC822Name(DerValue derValue) throws IOException {
|
||||
name = derValue.getIA5String();
|
||||
parseName(name);
|
||||
|
@ -61,6 +62,7 @@ public class RFC822Name implements GeneralNameInterface
|
|||
* @param name the RFC822Name.
|
||||
* @throws IOException on invalid input name
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public RFC822Name(String name) throws IOException {
|
||||
parseName(name);
|
||||
this.name = name;
|
||||
|
|
|
@ -125,6 +125,7 @@ public class X509CRLImpl extends X509CRL implements DerEncoder {
|
|||
*
|
||||
* @exception CRLException on parsing/construction errors.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public TBSCertList(X500Name issuer, Date thisDate, Date nextDate,
|
||||
X509CRLEntry[] badCerts)
|
||||
throws CRLException
|
||||
|
@ -175,6 +176,7 @@ public class X509CRLImpl extends X509CRL implements DerEncoder {
|
|||
/**
|
||||
* Constructs from the encoding.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public TBSCertList(DerValue value) throws IOException, CRLException {
|
||||
|
||||
if (value.tag != DerValue.tag_Sequence)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue