[java-opensaml] 03/03: JPAR-85 - Checkstyle, check final variables

Tom Zeller tzeller at dragonacea.biz
Wed Aug 9 22:28:22 EDT 2017


This is an automated email from the git hooks/post-receive script.

tzeller 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=f3dda187da33155ccbd6e3fc42f79da412c8532c

commit f3dda187da33155ccbd6e3fc42f79da412c8532c
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Tue Aug 8 16:37:46 2017 -0500

    JPAR-85 - Checkstyle, check final variables
---
 .../saml/common/SAMLObjectContentReference.java    | 10 ++---
 .../opensaml/saml/common/SAMLObjectSupport.java    |  2 +-
 .../java/org/opensaml/saml/common/SAMLVersion.java |  2 +-
 .../saml/common/binding/SAMLBindingSupport.java    |  8 ++--
 .../binding/artifact/AbstractSAMLArtifact.java     |  2 +-
 .../messaging/SAMLMessageSecuritySupport.java      |  2 +-
 .../messaging/context/SAMLMessageInfoContext.java  | 16 ++++----
 .../messaging/context/SAMLPeerEntityContext.java   | 10 ++---
 .../MetadataNameIdentifierFormatStrategy.java      |  2 +-
 .../opensaml/saml/config/SAMLConfiguration.java    |  6 +--
 .../opensaml/saml/criterion/ArtifactCriterion.java |  2 +-
 .../opensaml/saml/criterion/BindingCriterion.java  |  2 +-
 .../saml/criterion/BindingLocationCriterion.java   |  2 +-
 .../BindingResponseLocationCriterion.java          |  2 +-
 .../opensaml/saml/criterion/EndpointCriterion.java |  2 +-
 .../saml/criterion/EntityRoleCriterion.java        |  2 +-
 .../opensaml/saml/criterion/ProtocolCriterion.java |  2 +-
 .../saml/criterion/RoleDescriptorCriterion.java    |  2 +-
 .../resolver/filter/MetadataFilterChain.java       |  2 +-
 .../support/AttributeConsumingServiceSelector.java |  6 +--
 .../metadata/support/SAML2MetadataSupport.java     |  4 +-
 .../artifact/SAML1ArtifactBuilderFactory.java      |  4 +-
 .../binding/artifact/SAML1ArtifactType0001.java    |  8 ++--
 .../binding/artifact/SAML1ArtifactType0002.java    | 14 +++----
 .../artifact/SAML1ArtifactType0002Builder.java     |  2 +-
 .../saml2/assertion/SAML20AssertionValidator.java  | 48 +++++++++++-----------
 .../binding/artifact/AbstractSAML2Artifact.java    |  4 +-
 .../artifact/SAML2ArtifactBuilderFactory.java      |  4 +-
 .../binding/artifact/SAML2ArtifactType0004.java    | 10 ++---
 .../artifact/SAML2ArtifactType0004Builder.java     |  2 +-
 .../opensaml/saml/saml2/common/SAML2Support.java   | 14 +++----
 .../opensaml/saml/saml2/encryption/Decrypter.java  |  6 +--
 .../opensaml/saml/saml2/encryption/Encrypter.java  | 34 +++++++--------
 33 files changed, 119 insertions(+), 119 deletions(-)

diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/SAMLObjectContentReference.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/SAMLObjectContentReference.java
index 62b52d4..21aa5b7 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/SAMLObjectContentReference.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/SAMLObjectContentReference.java
@@ -125,9 +125,9 @@ public class SAMLObjectContentReference implements ConfigurableContentReference
     /** {@inheritDoc} */
     public void createReference(@Nonnull final XMLSignature signature) {
         try {
-            Transforms dsigTransforms = new Transforms(signature.getDocument());
+            final Transforms dsigTransforms = new Transforms(signature.getDocument());
             for (int i=0; i<transforms.size(); i++) {
-                String transform = transforms.get(i);
+                final String transform = transforms.get(i);
                 dsigTransforms.addTransform(transform);
                 
                 if (transform.equals(SignatureConstants.TRANSFORM_C14N_EXCL_WITH_COMMENTS) ||
@@ -163,11 +163,11 @@ public class SAMLObjectContentReference implements ConfigurableContentReference
         // be stripped out by exclusive canonicalization. Need to make sure they aren't by explicitly
         // telling the transformer about them.
         log.debug("Adding list of inclusive namespaces for signature exclusive canonicalization transform");
-        LazySet<String> inclusiveNamespacePrefixes = new LazySet<>();
+        final LazySet<String> inclusiveNamespacePrefixes = new LazySet<>();
         populateNamespacePrefixes(inclusiveNamespacePrefixes, signableObject);
         
         if (inclusiveNamespacePrefixes != null && inclusiveNamespacePrefixes.size() > 0) {
-            InclusiveNamespaces inclusiveNamespaces = new InclusiveNamespaces(signature.getDocument(),
+            final InclusiveNamespaces inclusiveNamespaces = new InclusiveNamespaces(signature.getDocument(),
                     inclusiveNamespacePrefixes);
             transform.getElement().appendChild(inclusiveNamespaces.getElement());
         }
@@ -182,7 +182,7 @@ public class SAMLObjectContentReference implements ConfigurableContentReference
      */
     private void populateNamespacePrefixes(@Nonnull @NonnullElements final Set<String> namespacePrefixes,
             @Nonnull final XMLObject signatureContent) {
-        for (String prefix: signatureContent.getNamespaceManager().getNonVisibleNamespacePrefixes()) {
+        for (final String prefix: signatureContent.getNamespaceManager().getNonVisibleNamespacePrefixes()) {
             if (prefix != null) {
                 // For the default namespace prefix, exclusive c14n uses the special token "#default".
                 // Apache xmlsec requires this to be represented in the set with the
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/SAMLObjectSupport.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/SAMLObjectSupport.java
index 012d2b4..a369dce 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/SAMLObjectSupport.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/SAMLObjectSupport.java
@@ -51,7 +51,7 @@ public final class SAMLObjectSupport {
      * @param signableObject the signable SAML object to evaluate
      */
     public static void declareNonVisibleNamespaces(@Nonnull final SignableSAMLObject signableObject) {
-        Logger log = getLogger();
+        final Logger log = getLogger();
         if (signableObject.getDOM() == null && signableObject.getSignature() != null) {
             log.debug("Examining signed object for content references with exclusive canonicalization transform");
             boolean sawExclusive = false;
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/SAMLVersion.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/SAMLVersion.java
index 24217d5..dce7c92 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/SAMLVersion.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/SAMLVersion.java
@@ -89,7 +89,7 @@ public final class SAMLVersion {
      * @return SAMLVersion for the given string
      */
     public static final SAMLVersion valueOf(@Nonnull final String version) {
-        String[] components = version.split("\\.");
+        final String[] components = version.split("\\.");
         return valueOf(Integer.valueOf(components[0]), Integer.valueOf(components[1]));
     }
 
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/SAMLBindingSupport.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/SAMLBindingSupport.java
index 5147b82..6e91cd5 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/SAMLBindingSupport.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/SAMLBindingSupport.java
@@ -261,17 +261,17 @@ public final class SAMLBindingSupport {
         String messageDestination = null;
         //SAML 2 Request
         if (samlMessage instanceof org.opensaml.saml.saml2.core.RequestAbstractType) {
-            org.opensaml.saml.saml2.core.RequestAbstractType request =  
+            final org.opensaml.saml.saml2.core.RequestAbstractType request =  
                     (org.opensaml.saml.saml2.core.RequestAbstractType) samlMessage;
             messageDestination = StringSupport.trimOrNull(request.getDestination());
         //SAML 2 Response
         } else if (samlMessage instanceof org.opensaml.saml.saml2.core.StatusResponseType) {
-            org.opensaml.saml.saml2.core.StatusResponseType response = 
+            final org.opensaml.saml.saml2.core.StatusResponseType response = 
                     (org.opensaml.saml.saml2.core.StatusResponseType) samlMessage;
             messageDestination = StringSupport.trimOrNull(response.getDestination());
         //SAML 1 Response
         } else if (samlMessage instanceof org.opensaml.saml.saml1.core.ResponseAbstractType) {
-            org.opensaml.saml.saml1.core.ResponseAbstractType response = 
+            final org.opensaml.saml.saml1.core.ResponseAbstractType response = 
                     (org.opensaml.saml.saml1.core.ResponseAbstractType) samlMessage;
             messageDestination = StringSupport.trimOrNull(response.getRecipient());
         //SAML 1 Request
@@ -319,7 +319,7 @@ public final class SAMLBindingSupport {
         Constraint.isNotNull(artifactEndpointIndex, "Artifact endpoint index cannot be null");
         Constraint.isTrue(artifactEndpointIndex.length == 2, "Artifact endpoint index length was not 2, was: "
                 + artifactEndpointIndex.length);
-        short value = ByteBuffer.wrap(artifactEndpointIndex).order(ByteOrder.BIG_ENDIAN).getShort();
+        final short value = ByteBuffer.wrap(artifactEndpointIndex).order(ByteOrder.BIG_ENDIAN).getShort();
         return (int) Constraint.isGreaterThanOrEqual(0, value, 
                 "Input value was too large, resulting in a negative 16-bit short");
     }
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/artifact/AbstractSAMLArtifact.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/artifact/AbstractSAMLArtifact.java
index 523c7d7..8f12dcb 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/artifact/AbstractSAMLArtifact.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/artifact/AbstractSAMLArtifact.java
@@ -106,7 +106,7 @@ public abstract class AbstractSAMLArtifact implements SAMLArtifact {
         }
 
         if (o instanceof AbstractSAMLArtifact) {
-            AbstractSAMLArtifact otherArtifact = (AbstractSAMLArtifact) o;
+            final AbstractSAMLArtifact otherArtifact = (AbstractSAMLArtifact) o;
             return Arrays.equals(getArtifactBytes(), otherArtifact.getArtifactBytes());
         }
 
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/SAMLMessageSecuritySupport.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/SAMLMessageSecuritySupport.java
index 4c91964..3616acf 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/SAMLMessageSecuritySupport.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/SAMLMessageSecuritySupport.java
@@ -93,7 +93,7 @@ public final class SAMLMessageSecuritySupport {
      * @return true if allowed, otherwise false
      */
     public static boolean checkURLScheme(@Nonnull @NotEmpty final String scheme) {
-        String normalized = StringSupport.trimOrNull(scheme);
+        final String normalized = StringSupport.trimOrNull(scheme);
         if (normalized == null) {
             return false;
         } else {
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLMessageInfoContext.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLMessageInfoContext.java
index 1e19dce..04a86e5 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLMessageInfoContext.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLMessageInfoContext.java
@@ -99,22 +99,22 @@ public class SAMLMessageInfoContext extends BaseContext {
     @Nullable protected String resolveMessageId() {
         final SAMLObject samlMessage = resolveSAMLMessage();
         if (samlMessage instanceof org.opensaml.saml.saml2.core.RequestAbstractType) {
-            org.opensaml.saml.saml2.core.RequestAbstractType request =  
+            final org.opensaml.saml.saml2.core.RequestAbstractType request =  
                     (org.opensaml.saml.saml2.core.RequestAbstractType) samlMessage;
             return request.getID();
         //SAML 2 Response
         } else if (samlMessage instanceof org.opensaml.saml.saml2.core.StatusResponseType) {
-            org.opensaml.saml.saml2.core.StatusResponseType response = 
+            final org.opensaml.saml.saml2.core.StatusResponseType response = 
                     (org.opensaml.saml.saml2.core.StatusResponseType) samlMessage;
             return response.getID();
         //SAML 1 Response
         } else if (samlMessage instanceof org.opensaml.saml.saml1.core.ResponseAbstractType) {
-            org.opensaml.saml.saml1.core.ResponseAbstractType response = 
+            final org.opensaml.saml.saml1.core.ResponseAbstractType response = 
                     (org.opensaml.saml.saml1.core.ResponseAbstractType) samlMessage;
             return response.getID();
         //SAML 1 Request
         } else if (samlMessage instanceof org.opensaml.saml.saml1.core.RequestAbstractType) {
-            org.opensaml.saml.saml1.core.RequestAbstractType request = 
+            final org.opensaml.saml.saml1.core.RequestAbstractType request = 
                     (org.opensaml.saml.saml1.core.RequestAbstractType) samlMessage;
             return request.getID();
         }
@@ -131,22 +131,22 @@ public class SAMLMessageInfoContext extends BaseContext {
         final SAMLObject samlMessage = resolveSAMLMessage();
         //SAML 2 Request
         if (samlMessage instanceof org.opensaml.saml.saml2.core.RequestAbstractType) {
-            org.opensaml.saml.saml2.core.RequestAbstractType request =  
+            final org.opensaml.saml.saml2.core.RequestAbstractType request =  
                     (org.opensaml.saml.saml2.core.RequestAbstractType) samlMessage;
             return request.getIssueInstant();
         //SAML 2 Response
         } else if (samlMessage instanceof org.opensaml.saml.saml2.core.StatusResponseType) {
-            org.opensaml.saml.saml2.core.StatusResponseType response = 
+            final org.opensaml.saml.saml2.core.StatusResponseType response = 
                     (org.opensaml.saml.saml2.core.StatusResponseType) samlMessage;
             return response.getIssueInstant();
         //SAML 1 Response
         } else if (samlMessage instanceof org.opensaml.saml.saml1.core.ResponseAbstractType) {
-            org.opensaml.saml.saml1.core.ResponseAbstractType response = 
+            final org.opensaml.saml.saml1.core.ResponseAbstractType response = 
                     (org.opensaml.saml.saml1.core.ResponseAbstractType) samlMessage;
             return response.getIssueInstant();
         //SAML 1 Request
         } else if (samlMessage instanceof org.opensaml.saml.saml1.core.RequestAbstractType) {
-            org.opensaml.saml.saml1.core.RequestAbstractType request = 
+            final org.opensaml.saml.saml1.core.RequestAbstractType request = 
                     (org.opensaml.saml.saml1.core.RequestAbstractType) samlMessage;
             return request.getIssueInstant();
         }
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLPeerEntityContext.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLPeerEntityContext.java
index e0b6a13..35c0265 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLPeerEntityContext.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLPeerEntityContext.java
@@ -101,22 +101,22 @@ public class SAMLPeerEntityContext extends AbstractAuthenticatableSAMLEntityCont
         final SAMLObject samlMessage = resolveSAMLMessage();
         //SAML 2 Request
         if (samlMessage instanceof org.opensaml.saml.saml2.core.RequestAbstractType) {
-            org.opensaml.saml.saml2.core.RequestAbstractType request =  
+            final org.opensaml.saml.saml2.core.RequestAbstractType request =  
                     (org.opensaml.saml.saml2.core.RequestAbstractType) samlMessage;
             return processSaml2Request(request);
         //SAML 2 Response
         } else if (samlMessage instanceof org.opensaml.saml.saml2.core.StatusResponseType) {
-            org.opensaml.saml.saml2.core.StatusResponseType response = 
+            final org.opensaml.saml.saml2.core.StatusResponseType response = 
                     (org.opensaml.saml.saml2.core.StatusResponseType) samlMessage;
             return processSaml2Response(response);
         //SAML 1 Response
         } else if (samlMessage instanceof org.opensaml.saml.saml1.core.Response) {
-            org.opensaml.saml.saml1.core.Response response = 
+            final org.opensaml.saml.saml1.core.Response response = 
                     (org.opensaml.saml.saml1.core.Response) samlMessage;
             return processSaml1Response(response);
         //SAML 1 Request
         } else if (samlMessage instanceof org.opensaml.saml.saml1.core.Request) {
-            org.opensaml.saml.saml1.core.Request request = 
+            final org.opensaml.saml.saml1.core.Request request = 
                     (org.opensaml.saml.saml1.core.Request) samlMessage;
             return processSaml1Request(request);
         }
@@ -183,7 +183,7 @@ public class SAMLPeerEntityContext extends AbstractAuthenticatableSAMLEntityCont
         final List<Assertion> assertions = response.getAssertions();
         if (assertions != null && assertions.size() > 0) {
             log.info("Attempting to extract issuer from enclosed SAML 1.x Assertion(s)");
-            for (Assertion assertion : assertions) {
+            for (final Assertion assertion : assertions) {
                 if (assertion != null && assertion.getIssuer() != null) {
                     if (issuer != null && !issuer.equals(assertion.getIssuer())) {
                         log.warn("SAML 1.x assertions, within response '{}' contain different issuer IDs, " 
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/MetadataNameIdentifierFormatStrategy.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/MetadataNameIdentifierFormatStrategy.java
index eca0108..e577450 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/MetadataNameIdentifierFormatStrategy.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/MetadataNameIdentifierFormatStrategy.java
@@ -98,7 +98,7 @@ public class MetadataNameIdentifierFormatStrategy implements Function<ProfileReq
                 final SAMLPeerEntityContext peerCtx =
                         input.getInboundMessageContext().getSubcontext(SAMLPeerEntityContext.class);
                 if (peerCtx != null) {
-                    SAMLMetadataContext mdCtx = peerCtx.getSubcontext(SAMLMetadataContext.class);
+                    final SAMLMetadataContext mdCtx = peerCtx.getSubcontext(SAMLMetadataContext.class);
                     if (mdCtx != null && mdCtx.getRoleDescriptor() != null
                             && mdCtx.getRoleDescriptor() instanceof SSODescriptor) {
                         return (SSODescriptor) mdCtx.getRoleDescriptor();
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/config/SAMLConfiguration.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/config/SAMLConfiguration.java
index a214bbd..c5141ea 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/config/SAMLConfiguration.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/config/SAMLConfiguration.java
@@ -86,7 +86,7 @@ public class SAMLConfiguration {
      */
     public DateTimeFormatter getSAMLDateFormatter() {
         if (dateFormatter == null) {
-            DateTimeFormatter formatter = DateTimeFormat.forPattern(defaultDateFormat);
+            final DateTimeFormatter formatter = DateTimeFormat.forPattern(defaultDateFormat);
             dateFormatter = formatter.withChronology(ISOChronology.getInstanceUTC());
         }
         
@@ -103,7 +103,7 @@ public class SAMLConfiguration {
      * @param format date format used to string'ify date objects
      */
     public void setSAMLDateFormat(final String format) {
-        DateTimeFormatter formatter = DateTimeFormat.forPattern(format);
+        final DateTimeFormatter formatter = DateTimeFormat.forPattern(format);
         dateFormatter = formatter.withChronology(ISOChronology.getInstanceUTC());
     }
 
@@ -179,7 +179,7 @@ public class SAMLConfiguration {
         if (schemes == null || schemes.isEmpty()) {
             allowedBindingURLSchemes = Collections.emptyList();
         } else {
-            Collection<String> normalized = Collections2.transform(
+            final Collection<String> normalized = Collections2.transform(
                     StringSupport.normalizeStringCollection(schemes), lowercaseFunction);
             allowedBindingURLSchemes = new ArrayList<>(normalized);
         }
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/ArtifactCriterion.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/ArtifactCriterion.java
index 0075c54..3496c2b 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/ArtifactCriterion.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/ArtifactCriterion.java
@@ -54,7 +54,7 @@ public final class ArtifactCriterion implements Criterion {
     /** {@inheritDoc} */
     @Override
     public String toString() {
-        StringBuilder builder = new StringBuilder();
+        final StringBuilder builder = new StringBuilder();
         builder.append("ArtifactCriterion [artifact=");
         builder.append(Hex.encodeHex(artifact.getArtifactBytes(), true));
         builder.append("]");
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/BindingCriterion.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/BindingCriterion.java
index 3c5f5c7..1e55c74 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/BindingCriterion.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/BindingCriterion.java
@@ -66,7 +66,7 @@ public final class BindingCriterion implements Criterion {
     /** {@inheritDoc} */
     @Override
     public String toString() {
-        StringBuilder builder = new StringBuilder();
+        final StringBuilder builder = new StringBuilder();
         builder.append("BindingCriterion [bindings=");
         builder.append(bindings);
         builder.append("]");
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/BindingLocationCriterion.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/BindingLocationCriterion.java
index 7a60517..612f3cd 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/BindingLocationCriterion.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/BindingLocationCriterion.java
@@ -51,7 +51,7 @@ public final class BindingLocationCriterion implements Criterion {
     /** {@inheritDoc} */
     @Override
     public String toString() {
-        StringBuilder builder = new StringBuilder();
+        final StringBuilder builder = new StringBuilder();
         builder.append("BindingLocation [location=");
         builder.append(location);
         builder.append("]");
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/BindingResponseLocationCriterion.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/BindingResponseLocationCriterion.java
index 6ab6a41..d474253 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/BindingResponseLocationCriterion.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/BindingResponseLocationCriterion.java
@@ -53,7 +53,7 @@ public final class BindingResponseLocationCriterion implements Criterion {
     /** {@inheritDoc} */
     @Override
     public String toString() {
-        StringBuilder builder = new StringBuilder();
+        final StringBuilder builder = new StringBuilder();
         builder.append("BindingResponseLocation [location=");
         builder.append(location);
         builder.append("]");
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/EndpointCriterion.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/EndpointCriterion.java
index bdf93c7..c00c531 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/EndpointCriterion.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/EndpointCriterion.java
@@ -84,7 +84,7 @@ public final class EndpointCriterion<EndpointType extends Endpoint> implements C
     /** {@inheritDoc} */
     @Override
     public String toString() {
-        StringBuilder builder = new StringBuilder();
+        final StringBuilder builder = new StringBuilder();
         builder.append("EndpointCriterion [type=")
             .append(endpoint.getElementQName());
         if (endpoint.getBinding() != null) {
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/EntityRoleCriterion.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/EntityRoleCriterion.java
index bae5aab..c022634 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/EntityRoleCriterion.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/EntityRoleCriterion.java
@@ -50,7 +50,7 @@ public final class EntityRoleCriterion implements Criterion {
     /** {@inheritDoc} */
     @Override
     public String toString() {
-        StringBuilder builder = new StringBuilder();
+        final StringBuilder builder = new StringBuilder();
         builder.append("EntityRoleCriterion [role=");
         builder.append(role);
         builder.append("]");
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/ProtocolCriterion.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/ProtocolCriterion.java
index 1cbd70d..aaf789a 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/ProtocolCriterion.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/ProtocolCriterion.java
@@ -52,7 +52,7 @@ public final class ProtocolCriterion implements Criterion {
     /** {@inheritDoc} */
     @Override
     public String toString() {
-        StringBuilder builder = new StringBuilder();
+        final StringBuilder builder = new StringBuilder();
         builder.append("ProtocolCriterion [protocol=");
         builder.append(protocol);
         builder.append("]");
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/RoleDescriptorCriterion.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/RoleDescriptorCriterion.java
index 924af7d..286439d 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/RoleDescriptorCriterion.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/criterion/RoleDescriptorCriterion.java
@@ -51,7 +51,7 @@ public final class RoleDescriptorCriterion implements Criterion {
     /** {@inheritDoc} */
     @Override
     public String toString() {
-        StringBuilder builder = new StringBuilder();
+        final StringBuilder builder = new StringBuilder();
         builder.append("RoleDescriptorCriterion [role=");
         builder.append(role);
         builder.append("]");
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/filter/MetadataFilterChain.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/filter/MetadataFilterChain.java
index f4a7fea..cb52b7b 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/filter/MetadataFilterChain.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/filter/MetadataFilterChain.java
@@ -68,7 +68,7 @@ public class MetadataFilterChain implements MetadataFilter {
             }
             
             XMLObject current = xmlObject;
-            for (MetadataFilter filter : filters) {
+            for (final MetadataFilter filter : filters) {
                 if (current == null) {
                     return null;
                 }
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/support/AttributeConsumingServiceSelector.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/support/AttributeConsumingServiceSelector.java
index e8f7324..889625e 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/support/AttributeConsumingServiceSelector.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/support/AttributeConsumingServiceSelector.java
@@ -135,7 +135,7 @@ public class AttributeConsumingServiceSelector {
      * @return the selected AttributeConsumingService, or null
      */
     public AttributeConsumingService selectService() {
-        List<AttributeConsumingService> candidates = getCandidates();
+        final List<AttributeConsumingService> candidates = getCandidates();
 
         if (candidates == null || candidates.isEmpty()) {
             log.debug("AttributeConsumingService candidate list was empty, can not select service");
@@ -203,7 +203,7 @@ public class AttributeConsumingServiceSelector {
      */
     private AttributeConsumingService selectByIndex(final List<AttributeConsumingService> candidates) {
         log.debug("Selecting AttributeConsumingService by index");
-        for (AttributeConsumingService attribCS : candidates) {
+        for (final AttributeConsumingService attribCS : candidates) {
             // Check for null b/c don't ever want to fail with an NPE due to autoboxing.
             // Note: metadata index property is an int, not an Integer.
             if (index != null) {
@@ -226,7 +226,7 @@ public class AttributeConsumingServiceSelector {
     private AttributeConsumingService selectDefault(final List<AttributeConsumingService> candidates) {
         log.debug("Selecting default AttributeConsumingService");
         AttributeConsumingService firstNoDefault = null;
-        for (AttributeConsumingService attribCS : candidates) {
+        for (final AttributeConsumingService attribCS : candidates) {
             if (attribCS.isDefault()) {
                 log.debug("Selected AttributeConsumingService with explicit isDefault of true");
                 return attribCS;
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/support/SAML2MetadataSupport.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/support/SAML2MetadataSupport.java
index 6180adc..50be802 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/support/SAML2MetadataSupport.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/support/SAML2MetadataSupport.java
@@ -51,7 +51,7 @@ public final class SAML2MetadataSupport {
      * 
      */
     public static <T extends IndexedEndpoint> T getDefaultIndexedEndpoint(final List<T> candidates) {
-        Logger log = getLogger();
+        final Logger log = getLogger();
         log.debug("Selecting default IndexedEndpoint");
         
         if (candidates == null || candidates.isEmpty()) {
@@ -60,7 +60,7 @@ public final class SAML2MetadataSupport {
         }
         
         T firstNoDefault = null;
-        for (T endpoint : candidates) {
+        for (final T endpoint : candidates) {
             if (endpoint.isDefault()) {
                 log.debug("Selected IndexedEndpoint with explicit isDefault of true");
                 return endpoint;
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactBuilderFactory.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactBuilderFactory.java
index 2fd717d..7ab4bc4 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactBuilderFactory.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactBuilderFactory.java
@@ -80,11 +80,11 @@ public class SAML1ArtifactBuilderFactory {
             return null;
         }
         
-        byte[] type = new byte[2];
+        final byte[] type = new byte[2];
         type[0] = artifact[0];
         type[1] = artifact[1];
 
-        SAML1ArtifactBuilder<?> artifactBuilder = getArtifactBuilder(type);
+        final SAML1ArtifactBuilder<?> artifactBuilder = getArtifactBuilder(type);
         if (artifactBuilder == null) {
             throw new IllegalArgumentException("Saw unsupported artifact type: " + new String(type));
         }
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0001.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0001.java
index d96c4a5..b34e30e 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0001.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0001.java
@@ -72,15 +72,15 @@ public class SAML1ArtifactType0001 extends AbstractSAML1Artifact implements SAML
             throw new IllegalArgumentException("Artifact length must be 42 bytes it was " + artifact.length + "bytes");
         }
 
-        byte[] typeCode = { artifact[0], artifact[1] };
+        final byte[] typeCode = { artifact[0], artifact[1] };
         if (!Arrays.equals(typeCode, TYPE_CODE)) {
             throw new IllegalArgumentException("Artifact is not of appropriate type.");
         }
 
-        byte[] sourceID = new byte[20];
+        final byte[] sourceID = new byte[20];
         System.arraycopy(artifact, 2, sourceID, 0, 20);
 
-        byte[] assertionHandle = new byte[20];
+        final byte[] assertionHandle = new byte[20];
         System.arraycopy(artifact, 22, assertionHandle, 0, 20);
 
         return new SAML1ArtifactType0001(sourceID, assertionHandle);
@@ -132,7 +132,7 @@ public class SAML1ArtifactType0001 extends AbstractSAML1Artifact implements SAML
 
     /** {@inheritDoc} */
     public byte[] getRemainingArtifact() {
-        byte[] remainingArtifact = new byte[40];
+        final byte[] remainingArtifact = new byte[40];
 
         System.arraycopy(getSourceID(), 0, remainingArtifact, 0, 20);
         System.arraycopy(getAssertionHandle(), 0, remainingArtifact, 20, 20);
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0002.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0002.java
index ac32dd5..d645434 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0002.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0002.java
@@ -68,16 +68,16 @@ public class SAML1ArtifactType0002 extends AbstractSAML1Artifact implements SAML
      * @throws IllegalArgumentException thrown if the artifact type is not 0x0002
      */
     public static SAML1ArtifactType0002 parseArtifact(final byte[] artifact) {
-        byte[] typeCode = { artifact[0], artifact[1] };
+        final byte[] typeCode = { artifact[0], artifact[1] };
         if (!Arrays.equals(typeCode, TYPE_CODE)) {
             throw new IllegalArgumentException("Artifact is not of appropriate type.");
         }
 
-        byte[] assertionHandle = new byte[20];
+        final byte[] assertionHandle = new byte[20];
         System.arraycopy(artifact, 2, assertionHandle, 0, 20);
 
-        int locationLength = artifact.length - 22;
-        byte[] sourceLocation = new byte[locationLength];
+        final int locationLength = artifact.length - 22;
+        final byte[] sourceLocation = new byte[locationLength];
         System.arraycopy(artifact, 22, sourceLocation, 0, locationLength);
 
         return new SAML1ArtifactType0002(assertionHandle, new String(sourceLocation));
@@ -121,7 +121,7 @@ public class SAML1ArtifactType0002 extends AbstractSAML1Artifact implements SAML
      * @throws IllegalArgumentException thrown if the given location is empty or null
      */
     protected void setSourceLocation(final String newLocation) {
-        String location = StringSupport.trimOrNull(newLocation);
+        final String location = StringSupport.trimOrNull(newLocation);
         if (location == null) {
             throw new IllegalArgumentException("Artifact source location may not be a null or empty string");
         }
@@ -131,8 +131,8 @@ public class SAML1ArtifactType0002 extends AbstractSAML1Artifact implements SAML
 
     /** {@inheritDoc} */
     public byte[] getRemainingArtifact() {
-        byte[] location = getSourceLocation().getBytes();
-        byte[] remainingArtifact = new byte[20 + location.length];
+        final byte[] location = getSourceLocation().getBytes();
+        final byte[] remainingArtifact = new byte[20 + location.length];
 
         System.arraycopy(getAssertionHandle(), 0, remainingArtifact, 0, 20);
         System.arraycopy(location, 0, remainingArtifact, 20, location.length);
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0002Builder.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0002Builder.java
index a97637e..1556247 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0002Builder.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0002Builder.java
@@ -90,7 +90,7 @@ public class SAML1ArtifactType0002Builder implements SAML1ArtifactBuilder<SAML1A
      * @return the index of the attribute resolution service
      */
     @Nullable protected String getArsEndpointUrl(@Nonnull final MessageContext<SAMLObject> requestContext) {
-        SAMLArtifactContext artifactContext = getArtifactContext(requestContext);
+        final SAMLArtifactContext artifactContext = getArtifactContext(requestContext);
 
         if (artifactContext == null || artifactContext.getSourceArtifactResolutionServiceEndpointURL() == null) {
             log.warn("No artifact resolution service endpoint URL is available");
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/assertion/SAML20AssertionValidator.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/assertion/SAML20AssertionValidator.java
index 50c04ce..c5ffe59 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/assertion/SAML20AssertionValidator.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/assertion/SAML20AssertionValidator.java
@@ -137,7 +137,7 @@ public class SAML20AssertionValidator {
         
         conditionValidators = new LazyMap<>();
         if (newConditionValidators != null) {
-            for (ConditionValidator validator : newConditionValidators) {
+            for (final ConditionValidator validator : newConditionValidators) {
                 if (validator != null) {
                     conditionValidators.put(validator.getServicedCondition(), validator);
                 }
@@ -146,7 +146,7 @@ public class SAML20AssertionValidator {
 
         subjectConfirmationValidators = new LazyMap<>();
         if (newConfirmationValidators != null) {
-            for (SubjectConfirmationValidator validator : newConfirmationValidators) {
+            for (final SubjectConfirmationValidator validator : newConfirmationValidators) {
                 if (validator != null) {
                     subjectConfirmationValidators.put(validator.getServicedMethod(), validator);
                 }
@@ -155,7 +155,7 @@ public class SAML20AssertionValidator {
 
         statementValidators = new LazyMap<>();
         if (newStatementValidators != null) {
-            for (StatementValidator validator : newStatementValidators) {
+            for (final StatementValidator validator : newStatementValidators) {
                 if (validator != null) {
                     statementValidators.put(validator.getServicedStatement(), validator);
                 }
@@ -321,7 +321,7 @@ public class SAML20AssertionValidator {
      */
     @Nonnull protected ValidationResult performSignatureValidation(@Nonnull final Assertion token, 
             @Nonnull final ValidationContext context) throws AssertionValidationException {
-        Signature signature = token.getSignature();
+        final Signature signature = token.getSignature();
         
         String tokenIssuer = null;
         if (token.getIssuer() != null) {
@@ -334,13 +334,13 @@ public class SAML20AssertionValidator {
         try {
             signaturePrevalidator.validate(signature);
         } catch (final SignatureException e) {
-            String msg = String.format("Assertion Signature failed pre-validation: %s", e.getMessage());
+            final String msg = String.format("Assertion Signature failed pre-validation: %s", e.getMessage());
             log.warn(msg);
             context.setValidationFailureMessage(msg);
             return ValidationResult.INVALID;
         }
         
-        CriteriaSet criteriaSet = getSignatureValidationCriteriaSet(token, context);
+        final CriteriaSet criteriaSet = getSignatureValidationCriteriaSet(token, context);
         
         try {
             if (trustEngine.validate(signature, criteriaSet)) {
@@ -348,14 +348,14 @@ public class SAML20AssertionValidator {
                         token.getID(), tokenIssuer);
                 return ValidationResult.VALID;
             } else {
-                String msg = String.format(
+                final String msg = String.format(
                         "Signature of Assertion '%s' from Issuer '%s' was not valid", token.getID(), tokenIssuer);
                 log.warn(msg);
                 context.setValidationFailureMessage(msg);
                 return ValidationResult.INVALID;
             }
         } catch (final SecurityException e) {
-            String msg = String.format(
+            final String msg = String.format(
                     "A problem was encountered evaluating the signature over Assertion with ID '%s': %s",
                     token.getID(), e.getMessage());
             log.warn(msg);
@@ -413,26 +413,26 @@ public class SAML20AssertionValidator {
     @Nonnull protected ValidationResult validateConditions(@Nonnull final Assertion assertion, 
             @Nonnull final ValidationContext context) throws AssertionValidationException {
         
-        Conditions conditions = assertion.getConditions();
+        final Conditions conditions = assertion.getConditions();
         if (conditions == null) {
             log.debug("Assertion contained no Conditions element");
             return ValidationResult.VALID;
         }
         
-        ValidationResult timeboundsResult = validateConditionsTimeBounds(assertion, context);
+        final ValidationResult timeboundsResult = validateConditionsTimeBounds(assertion, context);
         if (timeboundsResult != ValidationResult.VALID) {
             return timeboundsResult;
         }
 
         ConditionValidator validator;
-        for (Condition condition : conditions.getConditions()) {
+        for (final Condition condition : conditions.getConditions()) {
             validator = conditionValidators.get(condition.getElementQName());
             if (validator == null && condition.getSchemaType() != null) {
                 validator = conditionValidators.get(condition.getSchemaType());
             }
 
             if (validator == null) {
-                String msg = String.format(
+                final String msg = String.format(
                         "Unknown Condition '%s' of type '%s' in assertion '%s'", 
                                 condition.getElementQName(), condition.getSchemaType(), assertion.getID());
                 log.debug(msg);
@@ -468,15 +468,15 @@ public class SAML20AssertionValidator {
     @Nonnull protected ValidationResult validateConditionsTimeBounds(@Nonnull final Assertion assertion,
             @Nonnull final ValidationContext context) throws AssertionValidationException {
         
-        Conditions conditions = assertion.getConditions();
+        final Conditions conditions = assertion.getConditions();
         if (conditions == null) {
             return ValidationResult.VALID;
         }
         
-        DateTime now = new DateTime(ISOChronology.getInstanceUTC());
-        long clockSkew = getClockSkew(context);
+        final DateTime now = new DateTime(ISOChronology.getInstanceUTC());
+        final long clockSkew = getClockSkew(context);
 
-        DateTime notBefore = conditions.getNotBefore();
+        final DateTime notBefore = conditions.getNotBefore();
         log.debug("Evaluating Conditions NotBefore '{}' against 'skewed now' time '{}'",
                 notBefore, now.plus(clockSkew));
         if (notBefore != null && notBefore.isAfter(now.plus(clockSkew))) {
@@ -485,7 +485,7 @@ public class SAML20AssertionValidator {
             return ValidationResult.INVALID;
         }
 
-        DateTime notOnOrAfter = conditions.getNotOnOrAfter();
+        final DateTime notOnOrAfter = conditions.getNotOnOrAfter();
         log.debug("Evaluating Conditions NotOnOrAfter '{}' against 'skewed now' time '{}'",
                 notOnOrAfter, now.minus(clockSkew));
         if (notOnOrAfter != null && notOnOrAfter.isBefore(now.minus(clockSkew))) {
@@ -512,13 +512,13 @@ public class SAML20AssertionValidator {
     @Nonnull protected ValidationResult validateSubjectConfirmation(@Nonnull final Assertion assertion, 
             @Nonnull final ValidationContext context) throws AssertionValidationException {
         
-        Subject assertionSubject = assertion.getSubject();
+        final Subject assertionSubject = assertion.getSubject();
         if (assertionSubject == null) {
             log.debug("Assertion contains no Subject, skipping subject confirmation");
             return ValidationResult.VALID;
         }
 
-        List<SubjectConfirmation> confirmations = assertionSubject.getSubjectConfirmations();
+        final List<SubjectConfirmation> confirmations = assertionSubject.getSubjectConfirmations();
         if (confirmations == null || confirmations.isEmpty()) {
             log.debug("Assertion contains no SubjectConfirmations, skipping subject confirmation");
             return ValidationResult.VALID;
@@ -526,8 +526,8 @@ public class SAML20AssertionValidator {
         
         log.debug("Assertion contains at least 1 SubjectConfirmation, proceeding with subject confirmation");
 
-        for (SubjectConfirmation confirmation : confirmations) {
-            SubjectConfirmationValidator validator = subjectConfirmationValidators.get(confirmation.getMethod());
+        for (final SubjectConfirmation confirmation : confirmations) {
+            final SubjectConfirmationValidator validator = subjectConfirmationValidators.get(confirmation.getMethod());
             if (validator != null) {
                 try {
                     if (validator.validate(confirmation, assertion, context) == ValidationResult.VALID) {
@@ -542,7 +542,7 @@ public class SAML20AssertionValidator {
             }
         }
 
-        String msg = String.format(
+        final String msg = String.format(
                 "No subject confirmation methods were met for assertion with ID '%s'", assertion.getID());
         log.debug(msg);
         context.setValidationFailureMessage(msg);
@@ -563,14 +563,14 @@ public class SAML20AssertionValidator {
     @Nonnull protected ValidationResult validateStatements(@Nonnull final Assertion assertion, 
             @Nonnull final ValidationContext context) throws AssertionValidationException {
         
-        List<Statement> statements = assertion.getStatements();
+        final List<Statement> statements = assertion.getStatements();
         if (statements == null || statements.isEmpty()) {
             return ValidationResult.VALID;
         }
 
         ValidationResult result;
         StatementValidator validator;
-        for (Statement statement : statements) {
+        for (final Statement statement : statements) {
             validator = statementValidators.get(statement.getElementQName());
             if (validator == null && statement.getSchemaType() != null) {
                 validator = statementValidators.get(statement.getSchemaType());
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/AbstractSAML2Artifact.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/AbstractSAML2Artifact.java
index 6e18b9c..c360f7d 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/AbstractSAML2Artifact.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/AbstractSAML2Artifact.java
@@ -59,8 +59,8 @@ public abstract class AbstractSAML2Artifact extends AbstractSAMLArtifact impleme
      * @return the bytes for the artifact
      */
     public byte[] getArtifactBytes() {
-        byte[] remainingArtifact = getRemainingArtifact();
-        byte[] artifact = new byte[4 + remainingArtifact.length];
+        final byte[] remainingArtifact = getRemainingArtifact();
+        final byte[] artifact = new byte[4 + remainingArtifact.length];
 
         System.arraycopy(getTypeCode(), 0, artifact, 0, 2);
         System.arraycopy(getEndpointIndex(), 0, artifact, 2, 2);
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactBuilderFactory.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactBuilderFactory.java
index 4e84e6b..f5cef4e 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactBuilderFactory.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactBuilderFactory.java
@@ -79,11 +79,11 @@ public class SAML2ArtifactBuilderFactory {
             return null;
         }
         
-        byte[] type = new byte[2];
+        final byte[] type = new byte[2];
         type[0] = artifact[0];
         type[1] = artifact[1];
 
-        SAML2ArtifactBuilder<?> artifactBuilder = getArtifactBuilder(type);
+        final SAML2ArtifactBuilder<?> artifactBuilder = getArtifactBuilder(type);
         if (artifactBuilder == null) {
             throw new IllegalArgumentException("Saw unsupported artifact type: " + new String(type));
         }
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactType0004.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactType0004.java
index fe0dca9..6ba4bf6 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactType0004.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactType0004.java
@@ -71,17 +71,17 @@ public class SAML2ArtifactType0004 extends AbstractSAML2Artifact implements SAML
             throw new IllegalArgumentException("Artifact length must be 44 bytes it was " + artifact.length + "bytes");
         }
 
-        byte[] typeCode = { artifact[0], artifact[1] };
+        final byte[] typeCode = { artifact[0], artifact[1] };
         if (!Arrays.equals(typeCode, TYPE_CODE)) {
             throw new IllegalArgumentException("Illegal artifact type code");
         }
 
-        byte[] endpointIndex = { artifact[2], artifact[3] };
+        final byte[] endpointIndex = { artifact[2], artifact[3] };
 
-        byte[] sourceID = new byte[20];
+        final byte[] sourceID = new byte[20];
         System.arraycopy(artifact, 4, sourceID, 0, 20);
 
-        byte[] messageHandle = new byte[20];
+        final byte[] messageHandle = new byte[20];
         System.arraycopy(artifact, 24, messageHandle, 0, 20);
 
         return new SAML2ArtifactType0004(endpointIndex, sourceID, messageHandle);
@@ -133,7 +133,7 @@ public class SAML2ArtifactType0004 extends AbstractSAML2Artifact implements SAML
 
     /** {@inheritDoc} */
     public byte[] getRemainingArtifact() {
-        byte[] remainingArtifact = new byte[40];
+        final byte[] remainingArtifact = new byte[40];
 
         System.arraycopy(getSourceID(), 0, remainingArtifact, 0, 20);
         System.arraycopy(getMessageHandle(), 0, remainingArtifact, 20, 20);
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactType0004Builder.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactType0004Builder.java
index 1550b0f..3339f06 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactType0004Builder.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactType0004Builder.java
@@ -137,7 +137,7 @@ public class SAML2ArtifactType0004Builder implements SAML2ArtifactBuilder<SAML2A
      * @return 4-byte array representing integer
      */
     @Nonnull @NotEmpty private byte[] intToByteArray(final int integer) {
-        byte[] intBytes = new byte[4];
+        final byte[] intBytes = new byte[4];
         intBytes[0] = (byte) ((integer & 0xff000000) >>> 24);
         intBytes[1] = (byte) ((integer & 0x00ff0000) >>> 16);
         intBytes[2] = (byte) ((integer & 0x0000ff00) >>> 8);
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/common/SAML2Support.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/common/SAML2Support.java
index 4d2d278..59417f0 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/common/SAML2Support.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/common/SAML2Support.java
@@ -43,13 +43,13 @@ public final class SAML2Support {
      */
     public static boolean isValid(final XMLObject xmlObject) {
         if (xmlObject instanceof TimeBoundSAMLObject) {
-            TimeBoundSAMLObject timeBoundObject = (TimeBoundSAMLObject) xmlObject;
+            final TimeBoundSAMLObject timeBoundObject = (TimeBoundSAMLObject) xmlObject;
             if (!timeBoundObject.isValid()) {
                 return false;
             }
         }
 
-        XMLObject parent = xmlObject.getParent();
+        final XMLObject parent = xmlObject.getParent();
         if (parent != null) {
             return isValid(parent);
         }
@@ -70,7 +70,7 @@ public final class SAML2Support {
      * @return the earliest expiration time
      */
     @Nullable public static DateTime getEarliestExpiration(@Nullable final XMLObject xmlObject) {
-        DateTime now = new DateTime();
+        final DateTime now = new DateTime();
         return getEarliestExpiration(xmlObject, null, now);
     }
 
@@ -102,9 +102,9 @@ public final class SAML2Support {
 
         // Inspect children
         if (xmlObject != null) {
-            List<XMLObject> children = xmlObject.getOrderedChildren();
+            final List<XMLObject> children = xmlObject.getOrderedChildren();
             if (children != null) {
-                for (XMLObject child : xmlObject.getOrderedChildren()) {
+                for (final XMLObject child : xmlObject.getOrderedChildren()) {
                     if (child != null) {
                         earliestExpiration = getEarliestExpiration(child, earliestExpiration, now);
                     }
@@ -133,7 +133,7 @@ public final class SAML2Support {
         DateTime earliestExpiration = candidateTime;
 
         if (cacheableObject.getCacheDuration() != null && cacheableObject.getCacheDuration().longValue() > 0) {
-            DateTime elementExpirationTime = now.plus(cacheableObject.getCacheDuration().longValue());
+            final DateTime elementExpirationTime = now.plus(cacheableObject.getCacheDuration().longValue());
             if (earliestExpiration == null) {
                 earliestExpiration = elementExpirationTime;
             } else {
@@ -161,7 +161,7 @@ public final class SAML2Support {
         
         DateTime earliestExpiration = candidateTime;
         
-        DateTime elementExpirationTime = timeBoundObject.getValidUntil();
+        final DateTime elementExpirationTime = timeBoundObject.getValidUntil();
         if (earliestExpiration == null) {
             earliestExpiration = elementExpirationTime;
         } else {
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/encryption/Decrypter.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/encryption/Decrypter.java
index 959c020..9723781 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/encryption/Decrypter.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/encryption/Decrypter.java
@@ -101,7 +101,7 @@ public class Decrypter extends org.opensaml.xmlsec.encryption.support.Decrypter
      * @throws DecryptionException thrown when decryption generates an error
      */
     public Assertion decrypt(@Nonnull final EncryptedAssertion encryptedAssertion) throws DecryptionException {
-        SAMLObject samlObject = decryptData(encryptedAssertion);
+        final SAMLObject samlObject = decryptData(encryptedAssertion);
         if (! (samlObject instanceof Assertion)) {
             throw new DecryptionException("Decrypted SAMLObject was not an instance of Assertion");
         }
@@ -116,7 +116,7 @@ public class Decrypter extends org.opensaml.xmlsec.encryption.support.Decrypter
      * @throws DecryptionException thrown when decryption generates an error
      */
     public Attribute decrypt(@Nonnull final EncryptedAttribute encryptedAttribute) throws DecryptionException {
-        SAMLObject samlObject = decryptData(encryptedAttribute);
+        final SAMLObject samlObject = decryptData(encryptedAttribute);
         if (! (samlObject instanceof Attribute)) {
             throw new DecryptionException("Decrypted SAMLObject was not an instance of Attribute");
         }
@@ -149,7 +149,7 @@ public class Decrypter extends org.opensaml.xmlsec.encryption.support.Decrypter
      * @throws DecryptionException thrown when decryption generates an error
      */
     public NewID decrypt(@Nonnull final NewEncryptedID newEncryptedID) throws DecryptionException {
-        SAMLObject samlObject = decryptData(newEncryptedID);
+        final SAMLObject samlObject = decryptData(newEncryptedID);
         if (! (samlObject instanceof NewID)) {
             throw new DecryptionException("Decrypted SAMLObject was not an instance of NewID");
         }
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/encryption/Encrypter.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/encryption/Encrypter.java
index 49c95e5..e0277af 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/encryption/Encrypter.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/encryption/Encrypter.java
@@ -171,7 +171,7 @@ public class Encrypter extends org.opensaml.xmlsec.encryption.support.Encrypter
     public Encrypter(final DataEncryptionParameters dataEncParams, final KeyEncryptionParameters keyEncParam) {
         super();
 
-        List<KeyEncryptionParameters> keks = new ArrayList<>();
+        final List<KeyEncryptionParameters> keks = new ArrayList<>();
         keks.add(keyEncParam);
 
         this.encParams = dataEncParams;
@@ -188,7 +188,7 @@ public class Encrypter extends org.opensaml.xmlsec.encryption.support.Encrypter
     public Encrypter(final DataEncryptionParameters dataEncParams) {
         super();
 
-        List<KeyEncryptionParameters> keks = new ArrayList<>();
+        final List<KeyEncryptionParameters> keks = new ArrayList<>();
 
         this.encParams = dataEncParams;
         this.kekParamsList = keks;
@@ -347,23 +347,23 @@ public class Encrypter extends org.opensaml.xmlsec.encryption.support.Encrypter
 
         checkParams(encParams, kekParamsList);
 
-        EncryptedElementType encElement =
+        final EncryptedElementType encElement =
                 (EncryptedElementType) builderFactory.getBuilder(encElementName).buildObject(encElementName);
 
         // Marshall the containing element, we will need its Document context to pass
         // to the key encryption method
         checkAndMarshall(encElement);
-        Document ownerDocument = encElement.getDOM().getOwnerDocument();
+        final Document ownerDocument = encElement.getDOM().getOwnerDocument();
 
-        String encryptionAlgorithmURI = encParams.getAlgorithm();
+        final String encryptionAlgorithmURI = encParams.getAlgorithm();
         Key encryptionKey = CredentialSupport.extractEncryptionKey(encParams.getEncryptionCredential());
         if (encryptionKey == null) {
             encryptionKey = generateEncryptionKey(encryptionAlgorithmURI);
         }
 
-        EncryptedData encryptedData = encryptElement(xmlObject, encryptionKey, encryptionAlgorithmURI, false);
+        final EncryptedData encryptedData = encryptElement(xmlObject, encryptionKey, encryptionAlgorithmURI, false);
         if (encParams.getKeyInfoGenerator() != null) {
-            KeyInfoGenerator generator = encParams.getKeyInfoGenerator();
+            final KeyInfoGenerator generator = encParams.getKeyInfoGenerator();
             log.debug("Dynamically generating KeyInfo from Credential for EncryptedData using generator: {}", generator
                     .getClass().getName());
             try {
@@ -373,7 +373,7 @@ public class Encrypter extends org.opensaml.xmlsec.encryption.support.Encrypter
             }
         }
 
-        List<EncryptedKey> encryptedKeys = new ArrayList<>();
+        final List<EncryptedKey> encryptedKeys = new ArrayList<>();
         if (kekParamsList != null && !kekParamsList.isEmpty()) {
             encryptedKeys.addAll(encryptKey(encryptionKey, kekParamsList, ownerDocument));
         }
@@ -409,7 +409,7 @@ public class Encrypter extends org.opensaml.xmlsec.encryption.support.Encrypter
             encData.setKeyInfo(keyInfoBuilder.buildObject());
         }
 
-        for (EncryptedKey encKey : encKeys) {
+        for (final EncryptedKey encKey : encKeys) {
             if (encKey.getID() == null) {
                 encKey.setID(idGenerator.generateIdentifier());
             }
@@ -461,7 +461,7 @@ public class Encrypter extends org.opensaml.xmlsec.encryption.support.Encrypter
 
         log.debug("Placing EncryptedKey elements as peers of EncryptedData in EncryptedElementType");
 
-        for (EncryptedKey encKey : encKeys) {
+        for (final EncryptedKey encKey : encKeys) {
             if (encKey.getReferenceList() == null) {
                 encKey.setReferenceList(referenceListBuilder.buildObject());
             }
@@ -491,13 +491,13 @@ public class Encrypter extends org.opensaml.xmlsec.encryption.support.Encrypter
     protected void linkSinglePeerKey(final EncryptedData encData, final EncryptedKey encKey) {
         log.debug("Linking single peer EncryptedKey with RetrievalMethod and DataReference");
         // Forward reference from EncryptedData to the EncryptedKey
-        RetrievalMethod rm = retrievalMethodBuilder.buildObject();
+        final RetrievalMethod rm = retrievalMethodBuilder.buildObject();
         rm.setURI("#" + encKey.getID());
         rm.setType(EncryptionConstants.TYPE_ENCRYPTED_KEY);
         encData.getKeyInfo().getRetrievalMethods().add(rm);
 
         // Back reference from the EncryptedKey to the EncryptedData
-        DataReference dr = dataReferenceBuilder.buildObject();
+        final DataReference dr = dataReferenceBuilder.buildObject();
         dr.setURI("#" + encData.getID());
         encKey.getReferenceList().getDataReferences().add(dr);
     }
@@ -511,11 +511,11 @@ public class Encrypter extends org.opensaml.xmlsec.encryption.support.Encrypter
     protected void linkMultiplePeerKeys(final EncryptedData encData, final List<EncryptedKey> encKeys) {
         log.debug("Linking multiple peer EncryptedKeys with CarriedKeyName and DataReference");
         // Get the name of the data encryption key
-        List<KeyName> dataEncKeyNames = encData.getKeyInfo().getKeyNames();
-        String carriedKeyNameValue;
+        final List<KeyName> dataEncKeyNames = encData.getKeyInfo().getKeyNames();
+        final String carriedKeyNameValue;
         if (dataEncKeyNames.size() == 0 || Strings.isNullOrEmpty(dataEncKeyNames.get(0).getValue())) {
             // If there isn't one, autogenerate a random key name.
-            String keyNameValue = idGenerator.generateIdentifier();
+            final String keyNameValue = idGenerator.generateIdentifier();
             log.debug("EncryptedData encryption key had no KeyName, generated one for use in CarriedKeyName: {}",
                     keyNameValue);
 
@@ -531,14 +531,14 @@ public class Encrypter extends org.opensaml.xmlsec.encryption.support.Encrypter
         }
 
         // Set carried key name of the multicast key in each EncryptedKey
-        for (EncryptedKey encKey : encKeys) {
+        for (final EncryptedKey encKey : encKeys) {
             if (encKey.getCarriedKeyName() == null) {
                 encKey.setCarriedKeyName(carriedKeyNameBuilder.buildObject());
             }
             encKey.getCarriedKeyName().setValue(carriedKeyNameValue);
 
             // Back reference from the EncryptedKeys to the EncryptedData
-            DataReference dr = dataReferenceBuilder.buildObject();
+            final DataReference dr = dataReferenceBuilder.buildObject();
             dr.setURI("#" + encData.getID());
             encKey.getReferenceList().getDataReferences().add(dr);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list