Author: dkulp
Date: Wed Mar 4 17:08:56 2009
New Revision: 750077
URL: http://svn.apache.org/viewvc?rev=750077&view=rev
Log:
If a crypto fails to create with the properties/map, throw that exception to
not hide issues in the map
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java?rev=750077&r1=750076&r2=750077&view=diff
==============================================================================
---
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
(original)
+++
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
Wed Mar 4 17:08:56 2009
@@ -214,16 +214,16 @@
if (log.isDebugEnabled()) {
log.debug("Unable to instantiate (1): " + cryptoClassName, e);
}
- }
- try {
- // try to instantiate the Crypto subclass
- crypto = (Crypto) cryptogenClass.newInstance();
- return crypto;
- } catch (java.lang.Exception e) {
- if (log.isDebugEnabled()) {
- log.debug("Unable to instantiate (2): " + cryptoClassName, e);
+ try {
+ // try to instantiate the Crypto subclass
+ crypto = (Crypto) cryptogenClass.newInstance();
+ return crypto;
+ } catch (java.lang.Exception e2) {
+ if (log.isDebugEnabled()) {
+ log.debug("Unable to instantiate (2): " + cryptoClassName,
e2);
+ }
+ throw new RuntimeException(cryptoClassName + " cannot create
instance", e);
}
- throw new RuntimeException(cryptoClassName + " cannot create
instance", e);
}
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]