svn commit: r928273 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java

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

svn commit: r928273 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java

lektran
Author: lektran
Date: Sat Mar 27 21:00:27 2010
New Revision: 928273

URL: http://svn.apache.org/viewvc?rev=928273&view=rev
Log:
Removed a few redundant null checks.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=928273&r1=928272&r2=928273&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Sat Mar 27 21:00:27 2010
@@ -1017,7 +1017,7 @@ public class GenericDelegator implements
             ecaRunner.evalRules(EntityEcaHandler.EV_RUN, EntityEcaHandler.OP_REMOVE, primaryKey, false);
 
             // if audit log on for any fields, save old value before removing so it's still there
-            if (primaryKey != null && primaryKey.getModelEntity().getHasFieldWithAuditLog()) {
+            if (primaryKey.getModelEntity().getHasFieldWithAuditLog()) {
                 createEntityAuditLogAll(this.findOne(primaryKey.getEntityName(), primaryKey, false), true, true);
             }
 
@@ -1083,7 +1083,7 @@ public class GenericDelegator implements
             ecaRunner.evalRules(EntityEcaHandler.EV_RUN, EntityEcaHandler.OP_REMOVE, value, false);
 
             // if audit log on for any fields, save old value before actual remove
-            if (value != null && value.getModelEntity().getHasFieldWithAuditLog()) {
+            if (value.getModelEntity().getHasFieldWithAuditLog()) {
                 createEntityAuditLogAll(value, true, true);
             }
 
@@ -1346,7 +1346,7 @@ public class GenericDelegator implements
             this.encryptFields(value);
 
             // if audit log on for any fields, save old value before the update so we still have both
-            if (value != null && value.getModelEntity().getHasFieldWithAuditLog()) {
+            if (value.getModelEntity().getHasFieldWithAuditLog()) {
                 createEntityAuditLogAll(value, true, false);
             }