svn commit: r1334171 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1334171 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

doogie-3
Author: doogie
Date: Fri May  4 20:42:34 2012
New Revision: 1334171

URL: http://svn.apache.org/viewvc?rev=1334171&view=rev
Log:
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);
             }