[java-identity-provider] branch master updated: CodeStyle

Rod Widdowson rdw at steadingsoftware.com
Fri Dec 20 10:59:02 EST 2019


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

rdw 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=c9e9279c2df5391f3d3096bb0d16d8f090b7701e

The following commit(s) were added to refs/heads/master by this push:
       new  c9e9279   CodeStyle
c9e9279 is described below

commit c9e9279c2df5391f3d3096bb0d16d8f090b7701e
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Dec 20 15:58:43 2019 +0000

    CodeStyle
---
 .../flows/saml1/SAML1TestResponseValidator.java    |  4 +--
 .../shibboleth/idp/cli/ResolverTestArguments.java  |  2 +-
 .../impl/CSRFTokenFlowExecutionListenerTest.java   | 37 ++++++++++------------
 3 files changed, 19 insertions(+), 24 deletions(-)

diff --git a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/saml1/SAML1TestResponseValidator.java b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/saml1/SAML1TestResponseValidator.java
index e3d3394..fb3b0d2 100644
--- a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/saml1/SAML1TestResponseValidator.java
+++ b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/saml1/SAML1TestResponseValidator.java
@@ -216,8 +216,8 @@ public class SAML1TestResponseValidator {
         final Subject attributeStatementSubject = attributeStatement.getSubject();
         assertSubject(attributeStatementSubject);
 
-        final NameIdentifier nameIdentifier = attributeStatementSubject.getNameIdentifier();
-        assertNameIdentifier(nameIdentifier);
+        final NameIdentifier nameId = attributeStatementSubject.getNameIdentifier();
+        assertNameIdentifier(nameId);
 
         final SubjectConfirmation subjectConfirmation = attributeStatementSubject.getSubjectConfirmation();
         assertSubjectConfirmation(subjectConfirmation);
diff --git a/idp-core/src/main/java/net/shibboleth/idp/cli/ResolverTestArguments.java b/idp-core/src/main/java/net/shibboleth/idp/cli/ResolverTestArguments.java
index 27abea1..92af7c3 100644
--- a/idp-core/src/main/java/net/shibboleth/idp/cli/ResolverTestArguments.java
+++ b/idp-core/src/main/java/net/shibboleth/idp/cli/ResolverTestArguments.java
@@ -52,7 +52,7 @@ public class ResolverTestArguments extends AbstractCommandLineArguments {
     @Parameter(names = {"--saml2"}, description = "Show results with SAML 2.0 encoding")
     private boolean saml2;
 
-    /**
+    /*
      * Below are legacy options from the 2.x AACLI tool that are no longer supported.
      */
     
diff --git a/idp-ui/src/test/java/net/shibboleth/idp/ui/csrf/impl/CSRFTokenFlowExecutionListenerTest.java b/idp-ui/src/test/java/net/shibboleth/idp/ui/csrf/impl/CSRFTokenFlowExecutionListenerTest.java
index b8b490e..c91c07e 100644
--- a/idp-ui/src/test/java/net/shibboleth/idp/ui/csrf/impl/CSRFTokenFlowExecutionListenerTest.java
+++ b/idp-ui/src/test/java/net/shibboleth/idp/ui/csrf/impl/CSRFTokenFlowExecutionListenerTest.java
@@ -18,14 +18,9 @@
 package net.shibboleth.idp.ui.csrf.impl;
 
 
-import java.util.Arrays;
-import java.util.List;
 import java.util.UUID;
 import java.util.function.BiPredicate;
 
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
 import org.springframework.test.util.ReflectionTestUtils;
 import org.springframework.webflow.engine.ActionState;
 import org.springframework.webflow.engine.Flow;
@@ -322,16 +317,16 @@ public class CSRFTokenFlowExecutionListenerTest extends BaseCSRFTest{
     @Test public void testSetEnabled() {
 
         //create a new instance to test default enabled = false.
-        CSRFTokenFlowExecutionListener listener = new CSRFTokenFlowExecutionListener();
+        CSRFTokenFlowExecutionListener theListener = new CSRFTokenFlowExecutionListener();
         // test default is false.
-        Object enabledObject = ReflectionTestUtils.getField(listener, "enabled");
+        Object enabledObject = ReflectionTestUtils.getField(theListener, "enabled");
         Assert.assertNotNull(enabledObject);
         Assert.assertTrue(enabledObject instanceof Boolean);
         Assert.assertFalse(((Boolean) enabledObject));
 
         // test enabling
-        listener.setEnabled(true);
-        enabledObject = ReflectionTestUtils.getField(listener, "enabled");
+        theListener.setEnabled(true);
+        enabledObject = ReflectionTestUtils.getField(theListener, "enabled");
         Assert.assertNotNull(enabledObject);
         Assert.assertTrue(enabledObject instanceof Boolean);
         Assert.assertTrue(((Boolean) enabledObject));
@@ -405,30 +400,30 @@ public class CSRFTokenFlowExecutionListenerTest extends BaseCSRFTest{
     @Test(expectedExceptions=ComponentInitializationException.class) void testUnsetCsrfTokenManager() 
             throws ComponentInitializationException{
         
-        CSRFTokenFlowExecutionListener listener = new CSRFTokenFlowExecutionListener();
-        listener.setViewRequiresCSRFTokenPredicate(new DefaultViewRequiresCSRFTokenPredicate());
-        listener.setEventRequiresCSRFTokenValidationPredicate(new DefaultEventRequiresCSRFTokenValidationPredicate());
-        listener.initialize();
+        CSRFTokenFlowExecutionListener theListener = new CSRFTokenFlowExecutionListener();
+        theListener.setViewRequiresCSRFTokenPredicate(new DefaultViewRequiresCSRFTokenPredicate());
+        theListener.setEventRequiresCSRFTokenValidationPredicate(new DefaultEventRequiresCSRFTokenValidationPredicate());
+        theListener.initialize();
     }
     
     /** Test an unset ViewRequiresCSRFToken predicate triggers an initialisation exception.*/
     @Test(expectedExceptions=ComponentInitializationException.class) void testUnsetEventRequiresCSRFValidationPredicate() 
             throws ComponentInitializationException{
         
-        CSRFTokenFlowExecutionListener listener = new CSRFTokenFlowExecutionListener();
-        listener.setCsrfTokenManager(new CSRFTokenManager());
-        listener.setViewRequiresCSRFTokenPredicate(new DefaultViewRequiresCSRFTokenPredicate());
-        listener.initialize();
+        CSRFTokenFlowExecutionListener theListener = new CSRFTokenFlowExecutionListener();
+        theListener.setCsrfTokenManager(new CSRFTokenManager());
+        theListener.setViewRequiresCSRFTokenPredicate(new DefaultViewRequiresCSRFTokenPredicate());
+        theListener.initialize();
     }
     
     /** Test an unset EventRequiresCSRFTokenValidation predicate triggers an initialisation exception.*/
     @Test(expectedExceptions=ComponentInitializationException.class) void testUnsetViewRequiresCSRFTokenPredicate() 
             throws ComponentInitializationException{
         
-        CSRFTokenFlowExecutionListener listener = new CSRFTokenFlowExecutionListener();
-        listener.setCsrfTokenManager(new CSRFTokenManager());
-        listener.setEventRequiresCSRFTokenValidationPredicate(new DefaultEventRequiresCSRFTokenValidationPredicate());
-        listener.initialize();
+        CSRFTokenFlowExecutionListener theListener = new CSRFTokenFlowExecutionListener();
+        theListener.setCsrfTokenManager(new CSRFTokenManager());
+        theListener.setEventRequiresCSRFTokenValidationPredicate(new DefaultEventRequiresCSRFTokenValidationPredicate());
+        theListener.initialize();
     }
     
    

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


More information about the commits mailing list