[java-opensaml COMMIT] /trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/config/JavaCryptoValidationIniti...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Apr 30 23:02:59 EDT 2013
Author: scantor
Date: Tue Apr 30 23:02:59 2013
New Revision: 3329
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3329&view=rev
Log:
Fix an NPE occurring during tests.
Modified:
trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/config/JavaCryptoValidationInitializer.java
Modified: trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/config/JavaCryptoValidationInitializer.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/config/JavaCryptoValidationInitializer.java?rev=3329&r1=3328&r2=3329&view=diff
==============================================================================
--- trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/config/JavaCryptoValidationInitializer.java (original)
+++ trunk/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/config/JavaCryptoValidationInitializer.java Tue Apr 30 23:02:59 2013
@@ -18,6 +18,7 @@
package org.opensaml.xmlsec.config;
import java.security.NoSuchAlgorithmException;
+import java.util.Properties;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
@@ -77,8 +78,8 @@
}
if (!valid) {
- String isFatal =
- ConfigurationService.getConfigurationProperties().getProperty(CONFIG_PROPERTY_FAIL_IS_FATAL, "false");
+ Properties props = ConfigurationService.getConfigurationProperties();
+ String isFatal = (props != null) ? props.getProperty(CONFIG_PROPERTY_FAIL_IS_FATAL, "false") : "false";
if ("true".equalsIgnoreCase(isFatal) || "1".equals(isFatal)) {
log.warn("Configuration indicates an invalid crypto configuration should be fatal");
throw new InitializationException(
More information about the commits
mailing list