[java-opensaml] branch master updated: JPAR-106 - address Java 9 constructor deprecations
Ian Young
ian at iay.org.uk
Thu Feb 22 09:35:23 EST 2018
This is an automated email from the git hooks/post-receive script.
iay pushed a commit to branch master
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=c56a382dd98cc5e142ac572005ae07cbbd3c628d
The following commit(s) were added to refs/heads/master by this push:
new c56a382 JPAR-106 - address Java 9 constructor deprecations
c56a382 is described below
commit c56a382dd98cc5e142ac572005ae07cbbd3c628d
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Thu Feb 22 14:35:17 2018 +0000
JPAR-106 - address Java 9 constructor deprecations
---
.../opensaml/messaging/context/BaseContext.java | 2 +-
.../security/x509/PKIXValidationOptions.java | 2 +-
.../org/opensaml/security/x509/X509Support.java | 18 ++++-----
.../opensaml/security/crypto/KeySupportTest.java | 44 +++++++++++-----------
.../impl/memcached/StorageRecordTranscoder.java | 2 +-
.../xmlsec/algorithm/AlgorithmDescriptorsTest.java | 22 +++++------
.../signature/impl/SignatureUnmarshaller.java | 2 +-
.../BasicEncryptionParametersResolverTest.java | 2 +-
.../BasicSignatureSigningConfigurationTest.java | 2 +-
...asicSignatureSigningParametersResolverTest.java | 2 +-
.../signature/support/HMACSignatureTest.java | 4 +-
11 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/BaseContext.java b/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/BaseContext.java
index 429d5a0..1e26a9c 100644
--- a/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/BaseContext.java
+++ b/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/BaseContext.java
@@ -192,7 +192,7 @@ public abstract class BaseContext implements Iterable<BaseContext> {
// Note: This will throw if replace == false and existing != null.
// In that case, no link management happens, which is what we want, to leave things in a consistent state.
log.trace("Attempting to store a subcontext with type '{}' with replace option '{}'",
- new Object[]{subcontext.getClass().getName(), new Boolean(replace).toString()});
+ new Object[]{subcontext.getClass().getName(), Boolean.valueOf(replace).toString()});
subcontexts.add(subcontext, replace);
// Manage parent/child links
diff --git a/opensaml-security-api/src/main/java/org/opensaml/security/x509/PKIXValidationOptions.java b/opensaml-security-api/src/main/java/org/opensaml/security/x509/PKIXValidationOptions.java
index e8a5a77..10987f0 100644
--- a/opensaml-security-api/src/main/java/org/opensaml/security/x509/PKIXValidationOptions.java
+++ b/opensaml-security-api/src/main/java/org/opensaml/security/x509/PKIXValidationOptions.java
@@ -44,7 +44,7 @@ public class PKIXValidationOptions {
processExpiredCRLs = true;
processCredentialCRLs = true;
- defaultVerificationDepth = new Integer(1);
+ defaultVerificationDepth = 1;
}
/**
diff --git a/opensaml-security-api/src/main/java/org/opensaml/security/x509/X509Support.java b/opensaml-security-api/src/main/java/org/opensaml/security/x509/X509Support.java
index d8089af..91f4b40 100644
--- a/opensaml-security-api/src/main/java/org/opensaml/security/x509/X509Support.java
+++ b/opensaml-security-api/src/main/java/org/opensaml/security/x509/X509Support.java
@@ -81,31 +81,31 @@ public class X509Support {
public static final String SKI_OID = "2.5.29.14";
/** RFC 2459 Other Subject Alt Name type. */
- public static final Integer OTHER_ALT_NAME = new Integer(0);
+ public static final Integer OTHER_ALT_NAME = 0;
/** RFC 2459 RFC 822 (email address) Subject Alt Name type. */
- public static final Integer RFC822_ALT_NAME = new Integer(1);
+ public static final Integer RFC822_ALT_NAME = 1;
/** RFC 2459 DNS Subject Alt Name type. */
- public static final Integer DNS_ALT_NAME = new Integer(2);
+ public static final Integer DNS_ALT_NAME = 2;
/** RFC 2459 X.400 Address Subject Alt Name type. */
- public static final Integer X400ADDRESS_ALT_NAME = new Integer(3);
+ public static final Integer X400ADDRESS_ALT_NAME = 3;
/** RFC 2459 Directory Name Subject Alt Name type. */
- public static final Integer DIRECTORY_ALT_NAME = new Integer(4);
+ public static final Integer DIRECTORY_ALT_NAME = 4;
/** RFC 2459 EDI Party Name Subject Alt Name type. */
- public static final Integer EDI_PARTY_ALT_NAME = new Integer(5);
+ public static final Integer EDI_PARTY_ALT_NAME = 5;
/** RFC 2459 URI Subject Alt Name type. */
- public static final Integer URI_ALT_NAME = new Integer(6);
+ public static final Integer URI_ALT_NAME = 6;
/** RFC 2459 IP Address Subject Alt Name type. */
- public static final Integer IP_ADDRESS_ALT_NAME = new Integer(7);
+ public static final Integer IP_ADDRESS_ALT_NAME = 7;
/** RFC 2459 Registered ID Subject Alt Name type. */
- public static final Integer REGISTERED_ID_ALT_NAME = new Integer(8);
+ public static final Integer REGISTERED_ID_ALT_NAME = 8;
/** Constructed. */
protected X509Support() {
diff --git a/opensaml-security-api/src/test/java/org/opensaml/security/crypto/KeySupportTest.java b/opensaml-security-api/src/test/java/org/opensaml/security/crypto/KeySupportTest.java
index 0f4ce66..9bc29d8 100644
--- a/opensaml-security-api/src/test/java/org/opensaml/security/crypto/KeySupportTest.java
+++ b/opensaml-security-api/src/test/java/org/opensaml/security/crypto/KeySupportTest.java
@@ -170,31 +170,31 @@ public class KeySupportTest {
// Asymmetric: RSA
kp = KeySupport.generateKeyPair("RSA", 1024, null);
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), new Integer(1024));
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), new Integer(1024));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), Integer.valueOf(1024));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), Integer.valueOf(1024));
kp = KeySupport.generateKeyPair("RSA", 2048, null);
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), new Integer(2048));
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), new Integer(2048));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), Integer.valueOf(2048));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), Integer.valueOf(2048));
kp = KeySupport.generateKeyPair("RSA", 4096, null);
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), new Integer(4096));
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), new Integer(4096));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), Integer.valueOf(4096));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), Integer.valueOf(4096));
// Asymmetric: DSA
kp = KeySupport.generateKeyPair("DSA", 512, null);
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), new Integer(512));
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), new Integer(512));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), Integer.valueOf(512));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), Integer.valueOf(512));
kp = KeySupport.generateKeyPair("DSA", 1024, null);
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), new Integer(1024));
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), new Integer(1024));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), Integer.valueOf(1024));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), Integer.valueOf(1024));
// Asymmetric: EC
try {
kp = KeySupport.generateKeyPair("EC", 112, null);
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), new Integer(112));
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), new Integer(112));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), Integer.valueOf(112));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), Integer.valueOf(112));
} catch (final NoSuchAlgorithmException| InvalidParameterException e) {
// EC support isn't universal, e.g. OpenJDK 7 doesn't ship with an EC provider out-of-the-box.
@@ -203,8 +203,8 @@ public class KeySupportTest {
}
try {
kp = KeySupport.generateKeyPair("EC", 256, null);
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), new Integer(256));
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), new Integer(256));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), Integer.valueOf(256));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), Integer.valueOf(256));
} catch (final NoSuchAlgorithmException| InvalidParameterException e) {
// EC support isn't universal, e.g. OpenJDK 7 doesn't ship with an EC provider out-of-the-box.
@@ -213,8 +213,8 @@ public class KeySupportTest {
}
try {
kp = KeySupport.generateKeyPair("EC", 571, null);
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), new Integer(571));
- Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), new Integer(571));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPublic()), Integer.valueOf(571));
+ Assert.assertEquals(KeySupport.getKeyLength(kp.getPrivate()), Integer.valueOf(571));
} catch (final NoSuchAlgorithmException| InvalidParameterException e) {
// EC support isn't universal, e.g. OpenJDK 7 doesn't ship with an EC provider out-of-the-box.
// Just ignore unsupported algorithm abd InvalidParameter failures here for now.
@@ -222,18 +222,18 @@ public class KeySupportTest {
}
// Symmetric: AES
- Assert.assertEquals(KeySupport.getKeyLength(KeySupport.generateKey("AES", 128, null)), new Integer(128));
- Assert.assertEquals(KeySupport.getKeyLength(KeySupport.generateKey("AES", 192, null)), new Integer(192));
- Assert.assertEquals(KeySupport.getKeyLength(KeySupport.generateKey("AES", 256, null)), new Integer(256));
+ Assert.assertEquals(KeySupport.getKeyLength(KeySupport.generateKey("AES", 128, null)), Integer.valueOf(128));
+ Assert.assertEquals(KeySupport.getKeyLength(KeySupport.generateKey("AES", 192, null)), Integer.valueOf(192));
+ Assert.assertEquals(KeySupport.getKeyLength(KeySupport.generateKey("AES", 256, null)), Integer.valueOf(256));
// Symmetric: DES and DESede
//
// These numbers are correct, albeit unintuitive.
// DES keys are always 64 bits.
// DESede keys are always 64*3 = 192 bits (i.e. triple of DES).
- Assert.assertEquals(KeySupport.getKeyLength(KeySupport.generateKey("DES", 56, null)), new Integer(64));
- Assert.assertEquals(KeySupport.getKeyLength(KeySupport.generateKey("DESede", 112, null)), new Integer(192));
- Assert.assertEquals(KeySupport.getKeyLength(KeySupport.generateKey("DESede", 168, null)), new Integer(192));
+ Assert.assertEquals(KeySupport.getKeyLength(KeySupport.generateKey("DES", 56, null)), Integer.valueOf(64));
+ Assert.assertEquals(KeySupport.getKeyLength(KeySupport.generateKey("DESede", 112, null)), Integer.valueOf(192));
+ Assert.assertEquals(KeySupport.getKeyLength(KeySupport.generateKey("DESede", 168, null)), Integer.valueOf(192));
}
@DataProvider
diff --git a/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/memcached/StorageRecordTranscoder.java b/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/memcached/StorageRecordTranscoder.java
index 3a696de..974b9b7 100644
--- a/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/memcached/StorageRecordTranscoder.java
+++ b/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/memcached/StorageRecordTranscoder.java
@@ -56,7 +56,7 @@ public class StorageRecordTranscoder implements Transcoder<MemcachedStorageRecor
(((long) bytes[2] & 0xff) << 40) | (((long) bytes[3] & 0xff) << 32) |
(((long) bytes[4] & 0xff) << 24) | (((long) bytes[5] & 0xff) << 16) |
(((long) bytes[6] & 0xff) << 8) | ((long) bytes[7] & 0xff);
- return new MemcachedStorageRecord(value, exp == 0 ? null : new Long(exp));
+ return new MemcachedStorageRecord(value, exp == 0 ? null : exp);
}
@Override
diff --git a/opensaml-xmlsec-api/src/test/java/org/opensaml/xmlsec/algorithm/AlgorithmDescriptorsTest.java b/opensaml-xmlsec-api/src/test/java/org/opensaml/xmlsec/algorithm/AlgorithmDescriptorsTest.java
index a3eb647..9781b60 100644
--- a/opensaml-xmlsec-api/src/test/java/org/opensaml/xmlsec/algorithm/AlgorithmDescriptorsTest.java
+++ b/opensaml-xmlsec-api/src/test/java/org/opensaml/xmlsec/algorithm/AlgorithmDescriptorsTest.java
@@ -81,7 +81,7 @@ public class AlgorithmDescriptorsTest {
Assert.assertEquals(descriptor.getKey(), JCAConstants.KEY_ALGO_AES);
Assert.assertEquals(descriptor.getPadding(), JCAConstants.CIPHER_PADDING_ISO10126);
Assert.assertEquals(descriptor.getURI(), EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128);
- Assert.assertEquals(descriptor.getKeyLength(), new Integer(128));
+ Assert.assertEquals(descriptor.getKeyLength(), Integer.valueOf(128));
Assert.assertEquals(descriptor.getType(), AlgorithmDescriptor.AlgorithmType.BlockEncryption);
descriptor = new BlockEncryptionAES128GCM();
@@ -90,7 +90,7 @@ public class AlgorithmDescriptorsTest {
Assert.assertEquals(descriptor.getKey(), JCAConstants.KEY_ALGO_AES);
Assert.assertEquals(descriptor.getPadding(), JCAConstants.CIPHER_PADDING_NONE);
Assert.assertEquals(descriptor.getURI(), EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128_GCM);
- Assert.assertEquals(descriptor.getKeyLength(), new Integer(128));
+ Assert.assertEquals(descriptor.getKeyLength(), Integer.valueOf(128));
Assert.assertEquals(descriptor.getType(), AlgorithmDescriptor.AlgorithmType.BlockEncryption);
descriptor = new BlockEncryptionAES192CBC();
@@ -99,7 +99,7 @@ public class AlgorithmDescriptorsTest {
Assert.assertEquals(descriptor.getKey(), JCAConstants.KEY_ALGO_AES);
Assert.assertEquals(descriptor.getPadding(), JCAConstants.CIPHER_PADDING_ISO10126);
Assert.assertEquals(descriptor.getURI(), EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES192);
- Assert.assertEquals(descriptor.getKeyLength(), new Integer(192));
+ Assert.assertEquals(descriptor.getKeyLength(), Integer.valueOf(192));
Assert.assertEquals(descriptor.getType(), AlgorithmDescriptor.AlgorithmType.BlockEncryption);
descriptor = new BlockEncryptionAES192GCM();
@@ -108,7 +108,7 @@ public class AlgorithmDescriptorsTest {
Assert.assertEquals(descriptor.getKey(), JCAConstants.KEY_ALGO_AES);
Assert.assertEquals(descriptor.getPadding(), JCAConstants.CIPHER_PADDING_NONE);
Assert.assertEquals(descriptor.getURI(), EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES192_GCM);
- Assert.assertEquals(descriptor.getKeyLength(), new Integer(192));
+ Assert.assertEquals(descriptor.getKeyLength(), Integer.valueOf(192));
Assert.assertEquals(descriptor.getType(), AlgorithmDescriptor.AlgorithmType.BlockEncryption);
descriptor = new BlockEncryptionAES256CBC();
@@ -117,7 +117,7 @@ public class AlgorithmDescriptorsTest {
Assert.assertEquals(descriptor.getKey(), JCAConstants.KEY_ALGO_AES);
Assert.assertEquals(descriptor.getPadding(), JCAConstants.CIPHER_PADDING_ISO10126);
Assert.assertEquals(descriptor.getURI(), EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES256);
- Assert.assertEquals(descriptor.getKeyLength(), new Integer(256));
+ Assert.assertEquals(descriptor.getKeyLength(), Integer.valueOf(256));
Assert.assertEquals(descriptor.getType(), AlgorithmDescriptor.AlgorithmType.BlockEncryption);
descriptor = new BlockEncryptionAES256GCM();
@@ -126,7 +126,7 @@ public class AlgorithmDescriptorsTest {
Assert.assertEquals(descriptor.getKey(), JCAConstants.KEY_ALGO_AES);
Assert.assertEquals(descriptor.getPadding(), JCAConstants.CIPHER_PADDING_NONE);
Assert.assertEquals(descriptor.getURI(), EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES256_GCM);
- Assert.assertEquals(descriptor.getKeyLength(), new Integer(256));
+ Assert.assertEquals(descriptor.getKeyLength(), Integer.valueOf(256));
Assert.assertEquals(descriptor.getType(), AlgorithmDescriptor.AlgorithmType.BlockEncryption);
descriptor = new BlockEncryptionDESede();
@@ -135,7 +135,7 @@ public class AlgorithmDescriptorsTest {
Assert.assertEquals(descriptor.getKey(), JCAConstants.KEY_ALGO_DESEDE);
Assert.assertEquals(descriptor.getPadding(), JCAConstants.CIPHER_PADDING_ISO10126);
Assert.assertEquals(descriptor.getURI(), EncryptionConstants.ALGO_ID_BLOCKCIPHER_TRIPLEDES);
- Assert.assertEquals(descriptor.getKeyLength(), new Integer(192));
+ Assert.assertEquals(descriptor.getKeyLength(), Integer.valueOf(192));
Assert.assertEquals(descriptor.getType(), AlgorithmDescriptor.AlgorithmType.BlockEncryption);
}
@@ -372,28 +372,28 @@ public class AlgorithmDescriptorsTest {
Assert.assertEquals(descriptor.getJCAAlgorithmID(), JCAConstants.KEYWRAP_ALGO_AES);
Assert.assertEquals(descriptor.getKey(), JCAConstants.KEY_ALGO_AES);
Assert.assertEquals(descriptor.getURI(), EncryptionConstants.ALGO_ID_KEYWRAP_AES128);
- Assert.assertEquals(descriptor.getKeyLength(), new Integer(128));
+ Assert.assertEquals(descriptor.getKeyLength(), Integer.valueOf(128));
Assert.assertEquals(descriptor.getType(), AlgorithmDescriptor.AlgorithmType.SymmetricKeyWrap);
descriptor = new SymmetricKeyWrapAES192();
Assert.assertEquals(descriptor.getJCAAlgorithmID(), JCAConstants.KEYWRAP_ALGO_AES);
Assert.assertEquals(descriptor.getKey(), JCAConstants.KEY_ALGO_AES);
Assert.assertEquals(descriptor.getURI(), EncryptionConstants.ALGO_ID_KEYWRAP_AES192);
- Assert.assertEquals(descriptor.getKeyLength(), new Integer(192));
+ Assert.assertEquals(descriptor.getKeyLength(), Integer.valueOf(192));
Assert.assertEquals(descriptor.getType(), AlgorithmDescriptor.AlgorithmType.SymmetricKeyWrap);
descriptor = new SymmetricKeyWrapAES256();
Assert.assertEquals(descriptor.getJCAAlgorithmID(), JCAConstants.KEYWRAP_ALGO_AES);
Assert.assertEquals(descriptor.getKey(), JCAConstants.KEY_ALGO_AES);
Assert.assertEquals(descriptor.getURI(), EncryptionConstants.ALGO_ID_KEYWRAP_AES256);
- Assert.assertEquals(descriptor.getKeyLength(), new Integer(256));
+ Assert.assertEquals(descriptor.getKeyLength(), Integer.valueOf(256));
Assert.assertEquals(descriptor.getType(), AlgorithmDescriptor.AlgorithmType.SymmetricKeyWrap);
descriptor = new SymmetricKeyWrapDESede();
Assert.assertEquals(descriptor.getJCAAlgorithmID(), JCAConstants.KEYWRAP_ALGO_DESEDE);
Assert.assertEquals(descriptor.getKey(), JCAConstants.KEY_ALGO_DESEDE);
Assert.assertEquals(descriptor.getURI(), EncryptionConstants.ALGO_ID_KEYWRAP_TRIPLEDES);
- Assert.assertEquals(descriptor.getKeyLength(), new Integer(192));
+ Assert.assertEquals(descriptor.getKeyLength(), Integer.valueOf(192));
Assert.assertEquals(descriptor.getType(), AlgorithmDescriptor.AlgorithmType.SymmetricKeyWrap);
}
diff --git a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/SignatureUnmarshaller.java b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/SignatureUnmarshaller.java
index c3cf515..fb5a65e 100644
--- a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/SignatureUnmarshaller.java
+++ b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/SignatureUnmarshaller.java
@@ -107,7 +107,7 @@ public class SignatureUnmarshaller implements Unmarshaller {
final Element hmacElement = children.get(0);
final String value = StringSupport.trimOrNull(hmacElement.getTextContent());
if (value != null) {
- return new Integer(value);
+ return Integer.valueOf(value);
}
}
return null;
diff --git a/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicEncryptionParametersResolverTest.java b/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicEncryptionParametersResolverTest.java
index 1e355cd..2b4d0ef 100644
--- a/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicEncryptionParametersResolverTest.java
+++ b/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicEncryptionParametersResolverTest.java
@@ -232,7 +232,7 @@ public class BasicEncryptionParametersResolverTest extends XMLObjectBaseTestCase
Assert.assertNotNull(params.getDataEncryptionCredential());
Assert.assertNotNull(params.getDataEncryptionCredential().getSecretKey());
- Assert.assertEquals(KeySupport.getKeyLength(params.getDataEncryptionCredential().getSecretKey()), new Integer(128));
+ Assert.assertEquals(KeySupport.getKeyLength(params.getDataEncryptionCredential().getSecretKey()), Integer.valueOf(128));
Assert.assertEquals(params.getDataEncryptionAlgorithm(), defaultAES128DataAlgo);
Assert.assertNotNull(params.getDataKeyInfoGenerator());
}
diff --git a/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicSignatureSigningConfigurationTest.java b/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicSignatureSigningConfigurationTest.java
index 653e2ce..86922be 100644
--- a/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicSignatureSigningConfigurationTest.java
+++ b/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicSignatureSigningConfigurationTest.java
@@ -167,7 +167,7 @@ public class BasicSignatureSigningConfigurationTest {
config.setSignatureHMACOutputLength(128);
- Assert.assertEquals(config.getSignatureHMACOutputLength(), new Integer(128));
+ Assert.assertEquals(config.getSignatureHMACOutputLength(), Integer.valueOf(128));
config.setSignatureHMACOutputLength(null);
diff --git a/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicSignatureSigningParametersResolverTest.java b/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicSignatureSigningParametersResolverTest.java
index 05aeefd..cc106b7 100644
--- a/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicSignatureSigningParametersResolverTest.java
+++ b/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/impl/BasicSignatureSigningParametersResolverTest.java
@@ -257,7 +257,7 @@ public class BasicSignatureSigningParametersResolverTest extends XMLObjectBaseTe
Assert.assertEquals(params.getSignatureAlgorithm(), SignatureConstants.ALGO_ID_MAC_HMAC_SHA256);
Assert.assertEquals(params.getSignatureReferenceDigestMethod(), SignatureConstants.ALGO_ID_DIGEST_SHA256);
Assert.assertEquals(params.getSignatureCanonicalizationAlgorithm(), defaultC14N);
- Assert.assertEquals(params.getSignatureHMACOutputLength(), new Integer(160));
+ Assert.assertEquals(params.getSignatureHMACOutputLength(), Integer.valueOf(160));
Assert.assertNotNull(params.getKeyInfoGenerator());
}
diff --git a/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/signature/support/HMACSignatureTest.java b/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/signature/support/HMACSignatureTest.java
index 1645819..23ec37e 100644
--- a/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/signature/support/HMACSignatureTest.java
+++ b/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/signature/support/HMACSignatureTest.java
@@ -89,7 +89,7 @@ public class HMACSignatureTest extends XMLObjectBaseTestCase {
@BeforeMethod
protected void setUp() throws Exception {
- hmacOutputLength = new Integer(160);
+ hmacOutputLength = 160;
expectedKeyName = "KeyFoo123";
SecretKey key = KeySupport.generateKey("AES", 128, null);
@@ -281,7 +281,7 @@ public class HMACSignatureTest extends XMLObjectBaseTestCase {
Element outputLengthElement = children.get(0);
String value = StringSupport.trimOrNull(outputLengthElement.getTextContent());
Assert.assertNotNull(value, "Output length value was empty");
- Assert.assertEquals(new Integer(value), hmacOutputLength, "Output length was not the expected value");
+ Assert.assertEquals(Integer.valueOf(value), hmacOutputLength, "Output length was not the expected value");
}
/**
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list