[java-identity-provider] branch master updated: IDP-1047 Add @ParameterName Annotation to a test class.

Rod Widdowson rdw at steadingsoftware.com
Fri Jun 1 08:03:16 EDT 2018


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=10337c567b35470aa2aa4de30b2a68e1394597f3

The following commit(s) were added to refs/heads/master by this push:
       new  10337c5   IDP-1047 Add @ParameterName Annotation to a test class.
10337c5 is described below

commit 10337c567b35470aa2aa4de30b2a68e1394597f3
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon May 28 15:47:59 2018 +0100

    IDP-1047 Add @ParameterName Annotation to a test class.
    
    https://issues.shibboleth.net/jira/browse/IDP-1047
    
    Keeps the log under control.
---
 .../src/test/java/net/shibboleth/idp/test/InMemoryDirectory.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/idp-conf/src/test/java/net/shibboleth/idp/test/InMemoryDirectory.java b/idp-conf/src/test/java/net/shibboleth/idp/test/InMemoryDirectory.java
index e407899..19f7b7a 100644
--- a/idp-conf/src/test/java/net/shibboleth/idp/test/InMemoryDirectory.java
+++ b/idp-conf/src/test/java/net/shibboleth/idp/test/InMemoryDirectory.java
@@ -26,7 +26,6 @@ import javax.annotation.Nonnull;
 import org.ldaptive.ssl.CredentialConfigFactory;
 import org.ldaptive.ssl.SslConfig;
 import org.ldaptive.ssl.TLSSocketFactory;
-
 import org.springframework.core.io.Resource;
 
 import com.unboundid.ldap.listener.InMemoryDirectoryServer;
@@ -35,6 +34,7 @@ import com.unboundid.ldap.listener.InMemoryListenerConfig;
 import com.unboundid.ldap.sdk.LDAPException;
 import com.unboundid.ldif.LDIFReader;
 
+import net.shibboleth.utilities.java.support.annotation.ParameterName;
 import net.shibboleth.utilities.java.support.annotation.constraint.Positive;
 import net.shibboleth.utilities.java.support.logic.Constraint;
 
@@ -56,7 +56,9 @@ public class InMemoryDirectory {
      * @throws LDAPException if the in-memory directory server cannot be created
      * @throws IOException if the LDIF resource cannot be imported
      */
-    public InMemoryDirectory(@Nonnull final Resource ldif, @Positive final int port, @Nonnull final Resource keystore) throws LDAPException,
+    public InMemoryDirectory(@ParameterName(name="ldif") @Nonnull final Resource ldif,
+            @ParameterName(name="port") @Positive final int port,
+            @ParameterName(name="keystore") @Nonnull final Resource keystore) throws LDAPException,
             IOException {
         Constraint.isNotNull(ldif, "LDIF resource cannot be null");
         final InMemoryDirectoryServerConfig config =
@@ -71,7 +73,7 @@ public class InMemoryDirectory {
             
             config.setListenerConfigs(InMemoryListenerConfig.createLDAPConfig("default", null, port,
                     socketFactory));
-        } catch (GeneralSecurityException e) {
+        } catch (final GeneralSecurityException e) {
             throw new IOException("Error reading keystore", e);
         }
         config.addAdditionalBindCredentials("cn=Directory Manager", "password");

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


More information about the commits mailing list