Author: doogie
Date: Fri May 4 20:42:34 2012
New Revision: 1334171
URL:
http://svn.apache.org/viewvc?rev=1334171&view=revLog:
FIX: Handle the case of a field being encrypted that is currently null;
this is really just moving the null check into the local toString().
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=1334171&r1=1334170&r2=1334171&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Fri May 4 20:42:34 2012
@@ -1288,7 +1288,7 @@ public class GenericEntity extends Obser
for (String curKey: new TreeSet<String>(fields.keySet())) {
Object curValue = fields.get(curKey);
ModelField field = this.getModelEntity().getField(curKey);
- if (field.getEncrypt()) {
+ if (field.getEncrypt() && curValue instanceof String) {
String encryptField = (String) curValue;
curValue = HashCrypt.getDigestHash(encryptField);
}