Author: doogie
Date: Fri May 4 21:58:45 2012
New Revision: 1334217
URL:
http://svn.apache.org/viewvc?rev=1334217&view=revLog:
FEATURE: call UtilObject.getObjectException, and rethrow any exceptions,
so that the exception doesn't get logged multiple times.
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityCrypto.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityCrypto.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityCrypto.java?rev=1334217&r1=1334216&r2=1334217&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityCrypto.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityCrypto.java Fri May 4 21:58:45 2012
@@ -18,6 +18,7 @@
*/
package org.ofbiz.entity.util;
+import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.util.HashMap;
import java.util.Map;
@@ -112,7 +113,13 @@ public class EntityCrypto {
throw new EntityCryptoException("key(" + keyName + ") not found in database");
}
byte[] decryptedBytes = DesCrypt.decrypt(key, encryptedBytes);
- return UtilObject.getObject(decryptedBytes);
+ try {
+ return UtilObject.getObjectException(decryptedBytes);
+ } catch (ClassNotFoundException e) {
+ throw new GeneralException(e);
+ } catch (IOException e) {
+ throw new GeneralException(e);
+ }
}
protected SecretKey findKey(String originalKeyName, boolean useOldFunnyKeyHash) throws EntityCryptoException {