[java-opensaml] 02/02: CheckStyle: new Integer(foo) become Integer.valueOf(foo)
Rod Widdowson
rdw at steadingsoftware.com
Tue Feb 12 11:56:59 EST 2019
This is an automated email from the git hooks/post-receive script.
rdw 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=d618b3f7a2bbfccb9216b161b2f6105f582260ca
commit d618b3f7a2bbfccb9216b161b2f6105f582260ca
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Feb 12 16:50:05 2019 +0000
CheckStyle: new Integer(foo) become Integer.valueOf(foo)
---
.../binding/impl/SAMLAddAttributeConsumingServiceHandleTest.java | 6 +++---
.../org/opensaml/saml/ext/idpdisco/impl/DiscoveryResponseTest.java | 2 +-
.../java/org/opensaml/saml/ext/saml2alg/impl/SigningMethodTest.java | 4 ++--
.../test/java/org/opensaml/saml/ext/saml2mdui/impl/LogoTest.java | 4 ++--
.../java/org/opensaml/saml/saml2/core/impl/AuthnRequestTest.java | 4 ++--
.../test/java/org/opensaml/saml/saml2/core/impl/ScopingTest.java | 2 +-
.../saml/saml2/metadata/impl/ArtifactResolutionServiceTest.java | 2 +-
.../saml/saml2/metadata/impl/AssertionConsumerServiceTest.java | 2 +-
.../security/impl/SAMLMetadataEncryptionParametersResolverTest.java | 2 +-
.../decoder/http/impl/HttpClientResponseSOAP11DecoderTest.java | 4 ++--
.../opensaml/soap/wssecurity/impl/WSSecurityObjectsTestCase.java | 2 +-
.../opensaml/xacml/ctx/provider/impl/BaseObligationHandlerTest.java | 2 +-
12 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/impl/SAMLAddAttributeConsumingServiceHandleTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/impl/SAMLAddAttributeConsumingServiceHandleTest.java
index 73b9f73..a8b9a74 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/impl/SAMLAddAttributeConsumingServiceHandleTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/impl/SAMLAddAttributeConsumingServiceHandleTest.java
@@ -97,7 +97,7 @@ public class SAMLAddAttributeConsumingServiceHandleTest extends XMLObjectBaseTes
metadataContext.setRoleDescriptor(withACS);
final AuthnRequest request = SAML2ActionTestingSupport.buildAuthnRequest();
- request.setAttributeConsumingServiceIndex(new Integer(1));
+ request.setAttributeConsumingServiceIndex(Integer.valueOf(1));
messageContext.setMessage(request);
@@ -114,7 +114,7 @@ public class SAMLAddAttributeConsumingServiceHandleTest extends XMLObjectBaseTes
metadataContext.setRoleDescriptor(withACS);
final AuthnRequest request = SAML2ActionTestingSupport.buildAuthnRequest();
- request.setAttributeConsumingServiceIndex(new Integer(9));
+ request.setAttributeConsumingServiceIndex(Integer.valueOf(9));
messageContext.setMessage(request);
@@ -162,7 +162,7 @@ public class SAMLAddAttributeConsumingServiceHandleTest extends XMLObjectBaseTes
metadataContext.setRoleDescriptor(withACS);
final AuthnRequest request = SAML2ActionTestingSupport.buildAuthnRequest();
- request.setAttributeConsumingServiceIndex(new Integer(1));
+ request.setAttributeConsumingServiceIndex(Integer.valueOf(1));
navigatedHandler.initialize();
messageContext.setMessage(request);
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/ext/idpdisco/impl/DiscoveryResponseTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/ext/idpdisco/impl/DiscoveryResponseTest.java
index ce92fb3..34e207d 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/ext/idpdisco/impl/DiscoveryResponseTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/ext/idpdisco/impl/DiscoveryResponseTest.java
@@ -53,7 +53,7 @@ public class DiscoveryResponseTest extends XMLObjectProviderBaseTestCase {
expectedBinding = "urn:binding:foo";
expectedLocation = "example.org";
expectedResponseLocation = "example.org/response";
- expectedIndex = new Integer(3);
+ expectedIndex = Integer.valueOf(3);
expectedIsDefault = new XSBooleanValue(Boolean.TRUE, false);
}
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/ext/saml2alg/impl/SigningMethodTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/ext/saml2alg/impl/SigningMethodTest.java
index 76550d1..c628a01 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/ext/saml2alg/impl/SigningMethodTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/ext/saml2alg/impl/SigningMethodTest.java
@@ -49,8 +49,8 @@ public class SigningMethodTest extends XMLObjectProviderBaseTestCase {
SigningMethod signingMethod = (SigningMethod) unmarshallElement(singleElementOptionalAttributesFile);
Assert.assertNotNull(signingMethod);
Assert.assertEquals(signingMethod.getAlgorithm(), SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256);
- Assert.assertEquals(signingMethod.getMinKeySize(), new Integer(2048));
- Assert.assertEquals(signingMethod.getMaxKeySize(), new Integer(4096));
+ Assert.assertEquals(signingMethod.getMinKeySize(), Integer.valueOf(2048));
+ Assert.assertEquals(signingMethod.getMaxKeySize(), Integer.valueOf(4096));
}
/** {@inheritDoc} */
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/ext/saml2mdui/impl/LogoTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/ext/saml2mdui/impl/LogoTest.java
index 2f6e124..eaa5850 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/ext/saml2mdui/impl/LogoTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/ext/saml2mdui/impl/LogoTest.java
@@ -51,8 +51,8 @@ public class LogoTest extends XMLObjectProviderBaseTestCase {
singleElementFile = "/org/opensaml/saml/ext/saml2mdui/Logo.xml";
singleElementOptionalAttributesFile = "/org/opensaml/saml/ext/saml2mdui/LogoWithLang.xml";
expectedURL = "http://exaple.org/Logo";
- expectedHeight = new Integer(10);
- expectedWidth = new Integer(23);
+ expectedHeight = Integer.valueOf(10);
+ expectedWidth = Integer.valueOf(23);
expectedLang = "logoLang";
}
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/core/impl/AuthnRequestTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/core/impl/AuthnRequestTest.java
index 588b84b..c4a671a 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/core/impl/AuthnRequestTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/core/impl/AuthnRequestTest.java
@@ -82,9 +82,9 @@ public class AuthnRequestTest extends RequestTestBase {
expectedForceAuthn = new XSBooleanValue(Boolean.TRUE, false);
expectedIsPassive = new XSBooleanValue(Boolean.TRUE, false);
expectedProtocolBinding = "urn:string:protocol-binding";
- expectedAssertionConsumerServiceIndex = new Integer(3);
+ expectedAssertionConsumerServiceIndex = Integer.valueOf(3);
expectedAssertionConsumerServiceURL = "http://sp.example.org/acs";
- expectedAttributeConsumingServiceIndex = new Integer(2);
+ expectedAttributeConsumingServiceIndex = Integer.valueOf(2);
expectedProviderName = "Example Org";
}
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/core/impl/ScopingTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/core/impl/ScopingTest.java
index f8e0c24..048a45b 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/core/impl/ScopingTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/core/impl/ScopingTest.java
@@ -73,7 +73,7 @@ public class ScopingTest extends XMLObjectProviderBaseTestCase {
public void testSingleElementOptionalAttributesMarshall() {
Scoping scoping = (Scoping) buildXMLObject(Scoping.DEFAULT_ELEMENT_NAME);
- scoping.setProxyCount(new Integer(expectedProxyCount));
+ scoping.setProxyCount(Integer.valueOf(expectedProxyCount));
assertXMLEquals(expectedOptionalAttributesDOM, scoping);
}
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/ArtifactResolutionServiceTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/ArtifactResolutionServiceTest.java
index 5e98f6e..268c320 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/ArtifactResolutionServiceTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/ArtifactResolutionServiceTest.java
@@ -52,7 +52,7 @@ public class ArtifactResolutionServiceTest extends XMLObjectProviderBaseTestCase
expectedBinding = "urn:binding:foo";
expectedLocation = "example.org";
expectedResponseLocation = "example.org/response";
- expectedIndex = new Integer(3);
+ expectedIndex = Integer.valueOf(3);
expectedIsDefault = new XSBooleanValue(Boolean.TRUE, false);
}
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/AssertionConsumerServiceTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/AssertionConsumerServiceTest.java
index 193ff62..e0ff449 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/AssertionConsumerServiceTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/AssertionConsumerServiceTest.java
@@ -52,7 +52,7 @@ public class AssertionConsumerServiceTest extends XMLObjectProviderBaseTestCase
expectedBinding = "urn:binding:foo";
expectedLocation = "example.org";
expectedResponseLocation = "example.org/response";
- expectedIndex = new Integer(3);
+ expectedIndex = Integer.valueOf(3);
expectedIsDefault = new XSBooleanValue(Boolean.TRUE, false);
}
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/security/impl/SAMLMetadataEncryptionParametersResolverTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/security/impl/SAMLMetadataEncryptionParametersResolverTest.java
index 525365a..b834c9c 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/security/impl/SAMLMetadataEncryptionParametersResolverTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/security/impl/SAMLMetadataEncryptionParametersResolverTest.java
@@ -292,7 +292,7 @@ public class SAMLMetadataEncryptionParametersResolverTest extends XMLObjectBaseT
Assert.assertNotNull(params.getDataEncryptionCredential());
Assert.assertNotNull(params.getDataEncryptionCredential().getSecretKey());
Assert.assertEquals(params.getDataEncryptionAlgorithm(), defaultAES128DataAlgo);
- Assert.assertEquals(KeySupport.getKeyLength(params.getDataEncryptionCredential().getSecretKey()), new Integer(128));
+ Assert.assertEquals(KeySupport.getKeyLength(params.getDataEncryptionCredential().getSecretKey()), Integer.valueOf(128));
Assert.assertNotNull(params.getDataKeyInfoGenerator());
}
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/client/soap11/decoder/http/impl/HttpClientResponseSOAP11DecoderTest.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/client/soap11/decoder/http/impl/HttpClientResponseSOAP11DecoderTest.java
index a30b993..0f663e4 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/client/soap11/decoder/http/impl/HttpClientResponseSOAP11DecoderTest.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/client/soap11/decoder/http/impl/HttpClientResponseSOAP11DecoderTest.java
@@ -81,7 +81,7 @@ public class HttpClientResponseSOAP11DecoderTest extends XMLObjectBaseTestCase {
SOAP11Context soapContext = messageContext.getSubcontext(SOAP11Context.class, false);
Assert.assertNotNull(soapContext);
Assert.assertNotNull(soapContext.getEnvelope());
- Assert.assertEquals(soapContext.getHTTPResponseStatus(), new Integer(HttpStatus.SC_OK));
+ Assert.assertEquals(soapContext.getHTTPResponseStatus(), Integer.valueOf(HttpStatus.SC_OK));
}
@Test
@@ -105,7 +105,7 @@ public class HttpClientResponseSOAP11DecoderTest extends XMLObjectBaseTestCase {
SOAP11Context soapContext = messageContext.getSubcontext(SOAP11Context.class, false);
Assert.assertNotNull(soapContext);
Assert.assertNotNull(soapContext.getEnvelope());
- Assert.assertEquals(soapContext.getHTTPResponseStatus(), new Integer(HttpStatus.SC_OK));
+ Assert.assertEquals(soapContext.getHTTPResponseStatus(), Integer.valueOf(HttpStatus.SC_OK));
}
@Test(expectedExceptions=SOAP11FaultDecodingException.class)
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wssecurity/impl/WSSecurityObjectsTestCase.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wssecurity/impl/WSSecurityObjectsTestCase.java
index ac29b9a..f624563 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wssecurity/impl/WSSecurityObjectsTestCase.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wssecurity/impl/WSSecurityObjectsTestCase.java
@@ -110,7 +110,7 @@ public class WSSecurityObjectsTestCase extends WSBaseTestCase {
@Test
public void testIteration() throws Exception {
Iteration iteration= buildXMLObject(Iteration.ELEMENT_NAME);
- iteration.setValue(new Integer(1000));
+ iteration.setValue(Integer.valueOf(1000));
marshallAndUnmarshall(iteration);
}
diff --git a/opensaml-xacml-impl/src/test/java/org/opensaml/xacml/ctx/provider/impl/BaseObligationHandlerTest.java b/opensaml-xacml-impl/src/test/java/org/opensaml/xacml/ctx/provider/impl/BaseObligationHandlerTest.java
index b8ac427..7fc3c36 100644
--- a/opensaml-xacml-impl/src/test/java/org/opensaml/xacml/ctx/provider/impl/BaseObligationHandlerTest.java
+++ b/opensaml-xacml-impl/src/test/java/org/opensaml/xacml/ctx/provider/impl/BaseObligationHandlerTest.java
@@ -49,7 +49,7 @@ public class BaseObligationHandlerTest {
Assert.assertTrue(tc.equals(tc));
Assert.assertTrue(tc.equals(new TestClass(TEST_ID)));
Assert.assertEquals(tc.hashCode(), new TestClass(TEST_ID).hashCode());
- Assert.assertFalse(tc.equals(new Integer(3)));
+ Assert.assertFalse(tc.equals(Integer.valueOf(3)));
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list