[java-identity-provider] branch master updated: JPAR-106 - address Java 9 constructor deprecations
Ian Young
ian at iay.org.uk
Thu Feb 22 10:34:10 EST 2018
This is an automated email from the git hooks/post-receive script.
iay pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=202a593fda370da1b864bd29349cd705b451af2f
The following commit(s) were added to refs/heads/master by this push:
new 202a593 JPAR-106 - address Java 9 constructor deprecations
202a593 is described below
commit 202a593fda370da1b864bd29349cd705b451af2f
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Thu Feb 22 15:34:04 2018 +0000
JPAR-106 - address Java 9 constructor deprecations
---
.../shibboleth/idp/attribute/AttributeTest.java | 2 +-
.../LocalizedStringAttributeValueTest.java | 2 +-
.../policyrule/impl/ScriptedPolicyRuleTest.java | 2 +-
.../spnego/impl/SPNEGOAuthnControllerTest.java | 4 ++--
.../flow/impl/ConsentFlowDescriptorTest.java | 6 +++---
.../context/navigate/ScriptedFunctionTest.java | 4 ++--
.../AbstractProfileInterceptorResultTest.java | 20 ++++++++++----------
.../idp/profile/logic/ScriptedPredicateTest.java | 4 ++--
.../DynamicHTTPMetadataProviderParserTest.java | 22 +++++++++++-----------
.../LocalDynamicMetadataProviderParserTest.java | 10 +++++-----
.../PKIXValidationOptionsParserTest.java | 4 ++--
.../metadata/RelyingPartyMetadataProvider.java | 4 ++--
...adataPKIXValidationInformationResolverTest.java | 22 +++++++++++-----------
.../saml/xmlobject/impl/DelegationPolicyTest.java | 2 +-
.../idp/saml/xmlobject/impl/KeyAuthorityTest.java | 2 +-
15 files changed, 55 insertions(+), 55 deletions(-)
diff --git a/idp-attribute-api/src/test/java/net/shibboleth/idp/attribute/AttributeTest.java b/idp-attribute-api/src/test/java/net/shibboleth/idp/attribute/AttributeTest.java
index b0162aa..d987358 100644
--- a/idp-attribute-api/src/test/java/net/shibboleth/idp/attribute/AttributeTest.java
+++ b/idp-attribute-api/src/test/java/net/shibboleth/idp/attribute/AttributeTest.java
@@ -370,7 +370,7 @@ public class AttributeTest {
Assert.assertTrue(attrib.equals(attrib));
Assert.assertTrue(attrib.equals(dupl));
Assert.assertFalse(attrib.equals(null));
- Assert.assertFalse(attrib.equals(new Integer(2)));
+ Assert.assertFalse(attrib.equals(Integer.valueOf(2)));
Assert.assertEquals(attrib.hashCode(), dupl.hashCode());
Assert.assertNotSame(attrib.hashCode(), diff.hashCode());
diff --git a/idp-attribute-api/src/test/java/net/shibboleth/idp/attribute/LocalizedStringAttributeValueTest.java b/idp-attribute-api/src/test/java/net/shibboleth/idp/attribute/LocalizedStringAttributeValueTest.java
index 3ee60da..0a25305 100644
--- a/idp-attribute-api/src/test/java/net/shibboleth/idp/attribute/LocalizedStringAttributeValueTest.java
+++ b/idp-attribute-api/src/test/java/net/shibboleth/idp/attribute/LocalizedStringAttributeValueTest.java
@@ -42,6 +42,6 @@ public class LocalizedStringAttributeValueTest {
Assert.assertEquals(val.getValueLocale().getLanguage(), "en");
Assert.assertFalse(val.equals(null));
Assert.assertTrue(val.equals(val));
- Assert.assertFalse(val.equals(new Integer(2)));
+ Assert.assertFalse(val.equals(Integer.valueOf(2)));
}
}
diff --git a/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRuleTest.java b/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRuleTest.java
index 6d1b0c9..8fea82e 100644
--- a/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRuleTest.java
+++ b/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRuleTest.java
@@ -194,7 +194,7 @@ public class ScriptedPolicyRuleTest extends AbstractMatcherPolicyRuleTest {
Assert.assertEquals(rule.matches(filterContext), Tristate.TRUE);
rule = newScriptedPolicyRule(customReturnScript);
- rule.setCustomObject(new Boolean(true));
+ rule.setCustomObject(Boolean.valueOf(true));
rule.setId("test");
rule.initialize();
Assert.assertEquals(rule.matches(filterContext), Tristate.TRUE);
diff --git a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/spnego/impl/SPNEGOAuthnControllerTest.java b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/spnego/impl/SPNEGOAuthnControllerTest.java
index d689584..c95ff49 100644
--- a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/spnego/impl/SPNEGOAuthnControllerTest.java
+++ b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/spnego/impl/SPNEGOAuthnControllerTest.java
@@ -479,12 +479,12 @@ public class SPNEGOAuthnControllerTest {
}
private void assertResponseUnauthorizedNegotiate(MockHttpServletResponse response) {
- Assert.assertEquals(new Integer(response.getStatus()), new Integer(401));
+ Assert.assertEquals(response.getStatus(), 401);
Assert.assertEquals(response.getHeader("WWW-Authenticate"), "Negotiate");
}
private void assertResponseUnauthorizedNegotiate(MockHttpServletResponse response, String base64token) {
- Assert.assertEquals(new Integer(response.getStatus()), new Integer(401));
+ Assert.assertEquals(response.getStatus(), 401);
Assert.assertEquals(response.getHeader("WWW-Authenticate"), "Negotiate " + base64token);
}
diff --git a/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/flow/impl/ConsentFlowDescriptorTest.java b/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/flow/impl/ConsentFlowDescriptorTest.java
index 2e419cb..245c504 100644
--- a/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/flow/impl/ConsentFlowDescriptorTest.java
+++ b/idp-consent-impl/src/test/java/net/shibboleth/idp/consent/flow/impl/ConsentFlowDescriptorTest.java
@@ -52,15 +52,15 @@ public class ConsentFlowDescriptorTest {
}
@Test(expectedExceptions = ConstraintViolationException.class) public void testNegativeLifetime() {
- descriptor.setLifetime(new Long(-10));
+ descriptor.setLifetime(-10L);
}
@Test public void testLifetime() {
- Long lifetime = new Long(1000);
+ Long lifetime = Long.valueOf(1000);
descriptor.setLifetime(lifetime);
Assert.assertEquals(descriptor.getLifetime(), lifetime);
- lifetime = new Long(0);
+ lifetime = 0L;
descriptor.setLifetime(lifetime);
Assert.assertEquals(descriptor.getLifetime(), lifetime);
}
diff --git a/idp-profile-api/src/test/java/net/shibboleth/idp/profile/context/navigate/ScriptedFunctionTest.java b/idp-profile-api/src/test/java/net/shibboleth/idp/profile/context/navigate/ScriptedFunctionTest.java
index d0d2483..92d7adb 100644
--- a/idp-profile-api/src/test/java/net/shibboleth/idp/profile/context/navigate/ScriptedFunctionTest.java
+++ b/idp-profile-api/src/test/java/net/shibboleth/idp/profile/context/navigate/ScriptedFunctionTest.java
@@ -72,8 +72,8 @@ public class ScriptedFunctionTest {
script.setCustomObject("String");
Assert.assertEquals(script.apply(prc), "String");
- script.setCustomObject(new Integer(37));
- Assert.assertEquals(script.apply(prc), new Integer(37));
+ script.setCustomObject(Integer.valueOf(37));
+ Assert.assertEquals(script.apply(prc), Integer.valueOf(37));
}
diff --git a/idp-profile-api/src/test/java/net/shibboleth/idp/profile/interceptor/AbstractProfileInterceptorResultTest.java b/idp-profile-api/src/test/java/net/shibboleth/idp/profile/interceptor/AbstractProfileInterceptorResultTest.java
index aa90916..f1ba005 100644
--- a/idp-profile-api/src/test/java/net/shibboleth/idp/profile/interceptor/AbstractProfileInterceptorResultTest.java
+++ b/idp-profile-api/src/test/java/net/shibboleth/idp/profile/interceptor/AbstractProfileInterceptorResultTest.java
@@ -33,37 +33,37 @@ public class AbstractProfileInterceptorResultTest {
@Test(expectedExceptions = ConstraintViolationException.class)
public void testEmptyContext() {
- new MockAbstractProfileInterceptorResult("", "key", "value", new Long(100));
+ new MockAbstractProfileInterceptorResult("", "key", "value", 100L);
}
@Test(expectedExceptions = ConstraintViolationException.class)
public void testEmptyKey() {
- new MockAbstractProfileInterceptorResult("context", "", "value", new Long(100));
+ new MockAbstractProfileInterceptorResult("context", "", "value", 100L);
}
@Test(expectedExceptions = ConstraintViolationException.class)
public void testEmptyValue() {
- new MockAbstractProfileInterceptorResult("context", "key", "", new Long(100));
+ new MockAbstractProfileInterceptorResult("context", "key", "", 100L);
}
@Test(expectedExceptions = ConstraintViolationException.class)
public void testNullContext() {
- new MockAbstractProfileInterceptorResult(null, "key", "value", new Long(100));
+ new MockAbstractProfileInterceptorResult(null, "key", "value", 100L);
}
@Test(expectedExceptions = ConstraintViolationException.class)
public void testNullKey() {
- new MockAbstractProfileInterceptorResult("context", null, "value", new Long(100));
+ new MockAbstractProfileInterceptorResult("context", null, "value", 100L);
}
@Test(expectedExceptions = ConstraintViolationException.class)
public void testNullValue() {
- new MockAbstractProfileInterceptorResult("context", "key", null, new Long(100));
+ new MockAbstractProfileInterceptorResult("context", "key", null, 100L);
}
@Test(expectedExceptions = ConstraintViolationException.class)
public void testNegativeExpiration() {
- new MockAbstractProfileInterceptorResult("context", "key", null, new Long(-100));
+ new MockAbstractProfileInterceptorResult("context", "key", null, -100L);
}
@Test public void testNullExpiration() {
@@ -76,16 +76,16 @@ public class AbstractProfileInterceptorResultTest {
}
@Test(expectedExceptions = ConstraintViolationException.class) public void testZeroExpiration() {
- new MockAbstractProfileInterceptorResult("context", "key", null, new Long(0));
+ new MockAbstractProfileInterceptorResult("context", "key", null, 0L);
}
@Test public void testResult() {
final MockAbstractProfileInterceptorResult result =
- new MockAbstractProfileInterceptorResult("context", "key", "value", new Long(100));
+ new MockAbstractProfileInterceptorResult("context", "key", "value", 100L);
Assert.assertEquals(result.getStorageContext(), "context");
Assert.assertEquals(result.getStorageKey(), "key");
Assert.assertEquals(result.getStorageValue(), "value");
- Assert.assertEquals(result.getStorageExpiration(), new Long(100));
+ Assert.assertEquals(result.getStorageExpiration(), Long.valueOf(100));
}
private class MockAbstractProfileInterceptorResult extends AbstractProfileInterceptorResult {
diff --git a/idp-profile-api/src/test/java/net/shibboleth/idp/profile/logic/ScriptedPredicateTest.java b/idp-profile-api/src/test/java/net/shibboleth/idp/profile/logic/ScriptedPredicateTest.java
index 28a7e83..d23ec87 100644
--- a/idp-profile-api/src/test/java/net/shibboleth/idp/profile/logic/ScriptedPredicateTest.java
+++ b/idp-profile-api/src/test/java/net/shibboleth/idp/profile/logic/ScriptedPredicateTest.java
@@ -60,10 +60,10 @@ public class ScriptedPredicateTest {
@Test public void custom() throws ScriptException {
ScriptedPredicate test = ScriptedPredicate.inlineScript("custom;");
- test.setCustomObject(new Boolean(true));
+ test.setCustomObject(Boolean.valueOf(true));
Assert.assertTrue(test.apply(withChild));
- test.setCustomObject(new Boolean(false));
+ test.setCustomObject(Boolean.valueOf(false));
Assert.assertFalse(test.apply(withChild));
}
diff --git a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java
index ee507cf..21dfebb 100644
--- a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java
+++ b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java
@@ -61,11 +61,11 @@ public class DynamicHTTPMetadataProviderParserTest extends AbstractMetadataParse
Assert.assertNotNull(resolver.getParserPool());
Assert.assertEquals(resolver.getRefreshDelayFactor(), 0.75f);
- Assert.assertEquals(resolver.getMinCacheDuration(), new Long(10*60*1000L));
- Assert.assertEquals(resolver.getMaxCacheDuration(), new Long(8*60*60*1000L));
- Assert.assertEquals(resolver.getMaxIdleEntityData(), new Long(8*60*60*1000L));
+ Assert.assertEquals(resolver.getMinCacheDuration(), Long.valueOf(10*60*1000L));
+ Assert.assertEquals(resolver.getMaxCacheDuration(), Long.valueOf(8*60*60*1000L));
+ Assert.assertEquals(resolver.getMaxIdleEntityData(), Long.valueOf(8*60*60*1000L));
Assert.assertTrue(resolver.isRemoveIdleEntityData());
- Assert.assertEquals(resolver.getCleanupTaskInterval(), new Long(30*60*1000L));
+ Assert.assertEquals(resolver.getCleanupTaskInterval(), Long.valueOf(30*60*1000L));
Assert.assertEquals(resolver.getSupportedContentTypes(),
Arrays.asList("application/samlmetadata+xml", "application/xml", "text/xml"));
@@ -82,7 +82,7 @@ public class DynamicHTTPMetadataProviderParserTest extends AbstractMetadataParse
Assert.assertTrue(resolver.isInitializeFromPersistentCacheInBackground());
- Assert.assertEquals(resolver.getBackgroundInitializationFromCacheDelay(), new Long(2*1000));
+ Assert.assertEquals(resolver.getBackgroundInitializationFromCacheDelay(), Long.valueOf(2*1000));
Assert.assertEquals(resolver.getRequestURLBuilder().getClass(), HTTPEntityIDRequestURLBuilder.class);
}
@@ -145,7 +145,7 @@ public class DynamicHTTPMetadataProviderParserTest extends AbstractMetadataParse
Assert.assertFalse(resolver.isInitializeFromPersistentCacheInBackground());
- Assert.assertEquals(resolver.getBackgroundInitializationFromCacheDelay(), new Long(30*1000));
+ Assert.assertEquals(resolver.getBackgroundInitializationFromCacheDelay(), Long.valueOf(30*1000));
}
@Test
@@ -174,7 +174,7 @@ public class DynamicHTTPMetadataProviderParserTest extends AbstractMetadataParse
Assert.assertFalse(resolver.isInitializeFromPersistentCacheInBackground());
- Assert.assertEquals(resolver.getBackgroundInitializationFromCacheDelay(), new Long(30*1000));
+ Assert.assertEquals(resolver.getBackgroundInitializationFromCacheDelay(), Long.valueOf(30*1000));
}
@Test
@@ -189,11 +189,11 @@ public class DynamicHTTPMetadataProviderParserTest extends AbstractMetadataParse
Assert.assertNotNull(resolver.getParserPool());
Assert.assertEquals(resolver.getRefreshDelayFactor(), 0.50f);
- Assert.assertEquals(resolver.getMinCacheDuration(), new Long(5*60*1000L));
- Assert.assertEquals(resolver.getMaxCacheDuration(), new Long(4*60*60*1000L));
- Assert.assertEquals(resolver.getMaxIdleEntityData(), new Long(2*60*60*1000L));
+ Assert.assertEquals(resolver.getMinCacheDuration(), Long.valueOf(5*60*1000L));
+ Assert.assertEquals(resolver.getMaxCacheDuration(), Long.valueOf(4*60*60*1000L));
+ Assert.assertEquals(resolver.getMaxIdleEntityData(), Long.valueOf(2*60*60*1000L));
Assert.assertFalse(resolver.isRemoveIdleEntityData());
- Assert.assertEquals(resolver.getCleanupTaskInterval(), new Long(20*60*1000L));
+ Assert.assertEquals(resolver.getCleanupTaskInterval(), Long.valueOf(20*60*1000L));
Assert.assertEquals(resolver.getSupportedContentTypes(), Collections.singletonList("text/xml"));
diff --git a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/LocalDynamicMetadataProviderParserTest.java b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/LocalDynamicMetadataProviderParserTest.java
index 4a912e1..f3546b5 100644
--- a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/LocalDynamicMetadataProviderParserTest.java
+++ b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/LocalDynamicMetadataProviderParserTest.java
@@ -73,11 +73,11 @@ public class LocalDynamicMetadataProviderParserTest extends AbstractMetadataPars
Assert.assertNotNull(resolver.getParserPool());
Assert.assertEquals(resolver.getRefreshDelayFactor(), 0.75f);
- Assert.assertEquals(resolver.getMinCacheDuration(), new Long(10*60*1000L));
- Assert.assertEquals(resolver.getMaxCacheDuration(), new Long(8*60*60*1000L));
- Assert.assertEquals(resolver.getMaxIdleEntityData(), new Long(8*60*60*1000L));
+ Assert.assertEquals(resolver.getMinCacheDuration(), Long.valueOf(10*60*1000L));
+ Assert.assertEquals(resolver.getMaxCacheDuration(), Long.valueOf(8*60*60*1000L));
+ Assert.assertEquals(resolver.getMaxIdleEntityData(), Long.valueOf(8*60*60*1000L));
Assert.assertTrue(resolver.isRemoveIdleEntityData());
- Assert.assertEquals(resolver.getCleanupTaskInterval(), new Long(30*60*1000L));
+ Assert.assertEquals(resolver.getCleanupTaskInterval(), Long.valueOf(30*60*1000L));
Assert.assertFalse(resolver.isPersistentCachingEnabled());
@@ -91,7 +91,7 @@ public class LocalDynamicMetadataProviderParserTest extends AbstractMetadataPars
Assert.assertTrue(resolver.isInitializeFromPersistentCacheInBackground());
- Assert.assertEquals(resolver.getBackgroundInitializationFromCacheDelay(), new Long(2*1000));
+ Assert.assertEquals(resolver.getBackgroundInitializationFromCacheDelay(), Long.valueOf(2*1000));
}
diff --git a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/security/trustengine/PKIXValidationOptionsParserTest.java b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/security/trustengine/PKIXValidationOptionsParserTest.java
index f3319e7..2099845 100644
--- a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/security/trustengine/PKIXValidationOptionsParserTest.java
+++ b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/security/trustengine/PKIXValidationOptionsParserTest.java
@@ -38,7 +38,7 @@ public class PKIXValidationOptionsParserTest extends AbstractSecurityParserTest
Assert.assertTrue(what.isProcessCredentialCRLs());
Assert.assertTrue(what.isProcessEmptyCRLs());
Assert.assertTrue(what.isProcessExpiredCRLs());
- Assert.assertEquals(what.getDefaultVerificationDepth(), new Integer(1));
+ Assert.assertEquals(what.getDefaultVerificationDepth(), Integer.valueOf(1));
}
@Test public void complex() throws IOException {
@@ -47,7 +47,7 @@ public class PKIXValidationOptionsParserTest extends AbstractSecurityParserTest
Assert.assertFalse(what.isProcessCredentialCRLs());
Assert.assertFalse(what.isProcessEmptyCRLs());
Assert.assertTrue(what.isProcessExpiredCRLs());
- Assert.assertEquals(what.getDefaultVerificationDepth(), new Integer(2));
+ Assert.assertEquals(what.getDefaultVerificationDepth(), Integer.valueOf(2));
}
}
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/metadata/RelyingPartyMetadataProvider.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/metadata/RelyingPartyMetadataProvider.java
index 8a3cfae..7b94a86 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/metadata/RelyingPartyMetadataProvider.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/metadata/RelyingPartyMetadataProvider.java
@@ -83,7 +83,7 @@ public class RelyingPartyMetadataProvider extends AbstractServiceableComponent<M
*/
public void setSortKey(final int key) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
- sortKey = new Integer(key);
+ sortKey = key;
}
/**
@@ -155,7 +155,7 @@ public class RelyingPartyMetadataProvider extends AbstractServiceableComponent<M
if (null == sortKey) {
synchronized (this) {
sortKeyValue++;
- sortKey = new Integer(sortKeyValue);
+ sortKey = sortKeyValue;
}
log.info("Top level Metadata Provider '{}' did not have a sort key; giving it value '{}'",
getId(), sortKey);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/security/impl/MetadataPKIXValidationInformationResolverTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/security/impl/MetadataPKIXValidationInformationResolverTest.java
index 6580416..e83f416 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/security/impl/MetadataPKIXValidationInformationResolverTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/security/impl/MetadataPKIXValidationInformationResolverTest.java
@@ -172,7 +172,7 @@ public class MetadataPKIXValidationInformationResolverTest extends XMLObjectBase
infoSet = iter.next();
Assert.assertEquals(infoSet.getCertificates().size(), 3, "Incorrect number of certificates");
Assert.assertEquals(infoSet.getCRLs().size(), 1, "Incorrect number of CRL's");
- Assert.assertEquals(infoSet.getVerificationDepth(), new Integer(5), "Incorrect VerifyDepth");
+ Assert.assertEquals(infoSet.getVerificationDepth(), Integer.valueOf(5), "Incorrect VerifyDepth");
Assert.assertFalse(iter.hasNext(), "Iterator was not empty");
}
@@ -191,7 +191,7 @@ public class MetadataPKIXValidationInformationResolverTest extends XMLObjectBase
Assert.assertTrue(iter.hasNext(), "Iterator was empty");
infoSet = iter.next();
// 1 is the default VerifyDepth value
- Assert.assertEquals(infoSet.getVerificationDepth(), new Integer(1), "Incorrect VerifyDepth");
+ Assert.assertEquals(infoSet.getVerificationDepth(), Integer.valueOf(1), "Incorrect VerifyDepth");
Assert.assertFalse(iter.hasNext(), "Iterator was not empty");
}
@@ -211,7 +211,7 @@ public class MetadataPKIXValidationInformationResolverTest extends XMLObjectBase
infoSet = iter.next();
Assert.assertEquals(infoSet.getCertificates().size(), 7, "Incorrect number of certificates");
Assert.assertEquals(infoSet.getCRLs().size(), 2, "Incorrect number of CRL's");
- Assert.assertEquals(infoSet.getVerificationDepth(), new Integer(5), "Incorrect VerifyDepth");
+ Assert.assertEquals(infoSet.getVerificationDepth(), Integer.valueOf(5), "Incorrect VerifyDepth");
Assert.assertFalse(iter.hasNext(), "Iterator was not empty");
}
@@ -231,7 +231,7 @@ public class MetadataPKIXValidationInformationResolverTest extends XMLObjectBase
infoSet = iter.next();
Assert.assertEquals(infoSet.getCertificates().size(), 3, "Incorrect number of certificates");
Assert.assertEquals(infoSet.getCRLs().size(), 1, "Incorrect number of CRL's");
- Assert.assertEquals(infoSet.getVerificationDepth(), new Integer(5), "Incorrect VerifyDepth");
+ Assert.assertEquals(infoSet.getVerificationDepth(), Integer.valueOf(5), "Incorrect VerifyDepth");
Assert.assertFalse(iter.hasNext(), "Iterator was not empty");
@@ -262,13 +262,13 @@ public class MetadataPKIXValidationInformationResolverTest extends XMLObjectBase
infoSet = iter.next();
Assert.assertEquals(infoSet.getCertificates().size(), 1, "Incorrect number of certificates");
Assert.assertEquals(infoSet.getCRLs().size(), 1, "Incorrect number of CRL's");
- Assert.assertEquals(infoSet.getVerificationDepth(), new Integer(3), "Incorrect VerifyDepth");
+ Assert.assertEquals(infoSet.getVerificationDepth(), Integer.valueOf(3), "Incorrect VerifyDepth");
Assert.assertTrue(iter.hasNext(), "Iterator was empty");
infoSet = iter.next();
Assert.assertEquals(infoSet.getCertificates().size(), 6, "Incorrect number of certificates");
Assert.assertEquals(infoSet.getCRLs().size(), 1, "Incorrect number of CRL's");
- Assert.assertEquals(infoSet.getVerificationDepth(), new Integer(5), "Incorrect VerifyDepth");
+ Assert.assertEquals(infoSet.getVerificationDepth(), Integer.valueOf(5), "Incorrect VerifyDepth");
Assert.assertFalse(iter.hasNext(), "Iterator was not empty");
}
@@ -288,13 +288,13 @@ public class MetadataPKIXValidationInformationResolverTest extends XMLObjectBase
infoSet = iter.next();
Assert.assertEquals(infoSet.getCertificates().size(), 3, "Incorrect number of certificates");
Assert.assertEquals(infoSet.getCRLs().size(), 1, "Incorrect number of CRL's");
- Assert.assertEquals(infoSet.getVerificationDepth(), new Integer(5), "Incorrect VerifyDepth");
+ Assert.assertEquals(infoSet.getVerificationDepth(), Integer.valueOf(5), "Incorrect VerifyDepth");
Assert.assertTrue(iter.hasNext(), "Iterator was empty");
infoSet = iter.next();
Assert.assertEquals(infoSet.getCertificates().size(), 1, "Incorrect number of certificates");
Assert.assertEquals(infoSet.getCRLs().size(), 1, "Incorrect number of CRL's");
- Assert.assertEquals(infoSet.getVerificationDepth(), new Integer(3), "Incorrect VerifyDepth");
+ Assert.assertEquals(infoSet.getVerificationDepth(), Integer.valueOf(3), "Incorrect VerifyDepth");
Assert.assertFalse(iter.hasNext(), "Iterator was not empty");
@@ -315,19 +315,19 @@ public class MetadataPKIXValidationInformationResolverTest extends XMLObjectBase
infoSet = iter.next();
Assert.assertEquals(infoSet.getCertificates().size(), 1, "Incorrect number of certificates");
Assert.assertEquals(infoSet.getCRLs().size(), 1, "Incorrect number of CRL's");
- Assert.assertEquals(infoSet.getVerificationDepth(), new Integer(3), "Incorrect VerifyDepth");
+ Assert.assertEquals(infoSet.getVerificationDepth(), Integer.valueOf(3), "Incorrect VerifyDepth");
Assert.assertTrue(iter.hasNext(), "Iterator was empty");
infoSet = iter.next();
Assert.assertEquals(infoSet.getCertificates().size(), 3, "Incorrect number of certificates");
Assert.assertEquals(infoSet.getCRLs().size(), 0, "Incorrect number of CRL's");
- Assert.assertEquals(infoSet.getVerificationDepth(), new Integer(5), "Incorrect VerifyDepth");
+ Assert.assertEquals(infoSet.getVerificationDepth(), Integer.valueOf(5), "Incorrect VerifyDepth");
Assert.assertTrue(iter.hasNext(), "Iterator was empty");
infoSet = iter.next();
Assert.assertEquals(infoSet.getCertificates().size(), 4, "Incorrect number of certificates");
Assert.assertEquals(infoSet.getCRLs().size(), 1, "Incorrect number of CRL's");
- Assert.assertEquals(infoSet.getVerificationDepth(), new Integer(5), "Incorrect VerifyDepth");
+ Assert.assertEquals(infoSet.getVerificationDepth(), Integer.valueOf(5), "Incorrect VerifyDepth");
Assert.assertFalse(iter.hasNext(), "Iterator was not empty");
}
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/xmlobject/impl/DelegationPolicyTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/xmlobject/impl/DelegationPolicyTest.java
index 7b59d98..0221b00 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/xmlobject/impl/DelegationPolicyTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/xmlobject/impl/DelegationPolicyTest.java
@@ -39,7 +39,7 @@ public class DelegationPolicyTest extends XMLObjectProviderBaseTestCase {
@BeforeMethod
protected void setUp() throws Exception {
- expectedMaxChainLength = new Long(5);
+ expectedMaxChainLength = 5L;
}
/** {@inheritDoc} */
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/xmlobject/impl/KeyAuthorityTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/xmlobject/impl/KeyAuthorityTest.java
index a3246ca..01ef864 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/xmlobject/impl/KeyAuthorityTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/xmlobject/impl/KeyAuthorityTest.java
@@ -49,7 +49,7 @@ public class KeyAuthorityTest extends XMLObjectProviderBaseTestCase {
@BeforeMethod
protected void setUp() throws Exception {
- expectedVerifyDepth = new Integer(5);
+ expectedVerifyDepth = 5;
expectedNumKeyInfos = 4;
unknownAttribName = new QName("http://www.example.org/testObjects", "UnknownAttrib", "test");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list