[java-opensaml COMMIT] in /trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/support/impl: Expli...

noreply at shibboleth.net noreply at shibboleth.net
Wed Jul 2 09:01:18 EDT 2014


Author: rdw
Date: Wed Jul  2 09:01:18 2014
New Revision: 3943

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3943&view=rev
Log:
Checkstyle

Modified:
    trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/support/impl/ExplicitKeySignatureTrustEngine.java
    trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/support/impl/PKIXSignatureTrustEngine.java

Modified: trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/support/impl/ExplicitKeySignatureTrustEngine.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/support/impl/ExplicitKeySignatureTrustEngine.java?rev=3943&r1=3942&r2=3943&view=diff
==============================================================================
--- trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/support/impl/ExplicitKeySignatureTrustEngine.java (original)
+++ trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/support/impl/ExplicitKeySignatureTrustEngine.java Wed Jul  2 09:01:18 2014
@@ -36,15 +36,14 @@
 import org.opensaml.xmlsec.crypto.XMLSigningUtil;
 import org.opensaml.xmlsec.keyinfo.KeyInfoCredentialResolver;
 import org.opensaml.xmlsec.signature.Signature;
-import org.opensaml.xmlsec.signature.support.SignatureTrustEngine;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Strings;
 
 /**
- * An implementation of {@link SignatureTrustEngine} which evaluates the validity and trustworthiness of XML and raw
- * signatures.
+ * An implementation of {@link org.opensaml.xmlsec.signature.support.SignatureTrustEngine} which evaluates the validity
+ * and trustworthiness of XML and raw signatures.
  * 
  * <p>
  * Processing is first performed as described in {@link BaseSignatureTrustEngine}. If based on this processing, it is
@@ -75,19 +74,19 @@
     public ExplicitKeySignatureTrustEngine(@Nonnull final CredentialResolver resolver,
             @Nonnull final KeyInfoCredentialResolver keyInfoResolver) {
         super(keyInfoResolver);
-        
+
         credentialResolver = Constraint.isNotNull(resolver, "Credential resolver cannot be null");
         keyTrust = new ExplicitKeyTrustEvaluator();
     }
 
     /** {@inheritDoc} */
-    @Nonnull public CredentialResolver getCredentialResolver() {
+    @Override @Nonnull public CredentialResolver getCredentialResolver() {
         return credentialResolver;
     }
 
     /** {@inheritDoc} */
-    protected boolean doValidate(@Nonnull final Signature signature, @Nullable final CriteriaSet trustBasisCriteria)
-            throws SecurityException {
+    @Override protected boolean doValidate(@Nonnull final Signature signature,
+            @Nullable final CriteriaSet trustBasisCriteria) throws SecurityException {
 
         CriteriaSet criteriaSet = new CriteriaSet();
         criteriaSet.addAll(trustBasisCriteria);
@@ -126,7 +125,8 @@
     }
 
     /** {@inheritDoc} */
-    protected boolean doValidate(@Nonnull final byte[] signature, @Nonnull final byte[] content,
+    // CheckStyle: CyclomaticComplexity OFF
+    @Override protected boolean doValidate(@Nonnull final byte[] signature, @Nonnull final byte[] content,
             @Nonnull final String algorithmURI, @Nullable final CriteriaSet trustBasisCriteria,
             @Nullable final Credential candidateCredential) throws SecurityException {
 
@@ -160,10 +160,12 @@
                         log.debug("Failed to establish trust of supplied candidate credential");
                     }
                 }
+            // CheckStyle: EmptyBlock OFF
             } catch (SecurityException e) {
                 // Java 7 now throws this exception under conditions such as mismatched key sizes.
                 // Swallow this, it's logged by the verifyWithURI method already.
             }
+            // CheckStyle: EmptyBlock ON
         }
 
         // If the candidate verification credential did not verify the
@@ -177,18 +179,22 @@
                     log.debug("Successfully verified signature using resolved trusted credential");
                     return true;
                 }
+            // CheckStyle: EmptyBlock OFF
             } catch (SecurityException e) {
                 // Java 7 now throws this exception under conditions such as mismatched key sizes.
                 // Swallow this, it's logged by the verifyWithURI method already.
             }
+            // CheckStyle: EmptyBlock ON
         }
         log.debug("Failed to verify signature using either supplied candidate credential"
                 + " or directly trusted credentials");
         return false;
     }
 
-    /** {@inheritDoc} */
-    protected boolean evaluateTrust(@Nonnull final Credential untrustedCredential,
+    // CheckStyle: CyclomaticComplexity ON
+
+    /** {@inheritDoc} */
+    @Override protected boolean evaluateTrust(@Nonnull final Credential untrustedCredential,
             @Nullable final Iterable<Credential> trustedCredentials) throws SecurityException {
 

[... 220 lines stripped ...]


More information about the commits mailing list