Loading projects/cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/ldap/LdapConfig.java +2 −1 Original line number Diff line number Diff line Loading @@ -126,11 +126,12 @@ public class LdapConfig public static LdapConfig getLdapConfig(final String ldapProperties) { logger.debug("Reading LDAP properties from: " + ldapProperties); PropertiesReader pr = new PropertiesReader(ldapProperties); MultiValuedProperties config = pr.getAllProperties(); if (config.keySet() == null) if (config == null || config.keySet() == null) { throw new RuntimeException("failed to read any LDAP property "); } Loading projects/cadcAccessControl-Server/test/src/ca/nrc/cadc/ac/server/ldap/LdapDAOTest.java +4 −1 Original line number Diff line number Diff line Loading @@ -76,9 +76,11 @@ import javax.security.auth.x500.X500Principal; import ca.nrc.cadc.auth.HttpPrincipal; import ca.nrc.cadc.auth.NumericPrincipal; import ca.nrc.cadc.util.Log4jInit; import com.unboundid.ldap.sdk.LDAPConnection; import org.apache.log4j.Level; import org.junit.Test; import org.junit.BeforeClass; import static org.junit.Assert.*; Loading @@ -91,6 +93,7 @@ public class LdapDAOTest extends AbstractLdapDAOTest @BeforeClass public static void setUpBeforeClass() throws Exception { Log4jInit.setLevel("ca.nrc.cadc.ac", Level.INFO); // get the configuration of the development server from and config files... config = getLdapConfig(); } Loading Loading
projects/cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/ldap/LdapConfig.java +2 −1 Original line number Diff line number Diff line Loading @@ -126,11 +126,12 @@ public class LdapConfig public static LdapConfig getLdapConfig(final String ldapProperties) { logger.debug("Reading LDAP properties from: " + ldapProperties); PropertiesReader pr = new PropertiesReader(ldapProperties); MultiValuedProperties config = pr.getAllProperties(); if (config.keySet() == null) if (config == null || config.keySet() == null) { throw new RuntimeException("failed to read any LDAP property "); } Loading
projects/cadcAccessControl-Server/test/src/ca/nrc/cadc/ac/server/ldap/LdapDAOTest.java +4 −1 Original line number Diff line number Diff line Loading @@ -76,9 +76,11 @@ import javax.security.auth.x500.X500Principal; import ca.nrc.cadc.auth.HttpPrincipal; import ca.nrc.cadc.auth.NumericPrincipal; import ca.nrc.cadc.util.Log4jInit; import com.unboundid.ldap.sdk.LDAPConnection; import org.apache.log4j.Level; import org.junit.Test; import org.junit.BeforeClass; import static org.junit.Assert.*; Loading @@ -91,6 +93,7 @@ public class LdapDAOTest extends AbstractLdapDAOTest @BeforeClass public static void setUpBeforeClass() throws Exception { Log4jInit.setLevel("ca.nrc.cadc.ac", Level.INFO); // get the configuration of the development server from and config files... config = getLdapConfig(); } Loading