svn commit: r679056 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java

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

svn commit: r679056 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java

jacopoc
Author: jacopoc
Date: Wed Jul 23 03:16:02 2008
New Revision: 679056

URL: http://svn.apache.org/viewvc?rev=679056&view=rev
Log:
Small fix to prevent NPE under certain circumstances; still the code should be improved, but for now I am trying to change as less code as possible.

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java?rev=679056&r1=679055&r2=679056&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java Wed Jul 23 03:16:02 2008
@@ -536,8 +536,8 @@
                  GenericValue entity = delegator.findOne(entName, UtilMisc.toMap(pkName, id), false);
                          if (modelEntity.isField("childBranchCount")) {
                      entity.put("childBranchCount", nodeCount);
+                             entity.store();
                          }
-                 entity.store();
                  }
                  } catch(GenericEntityException e) {
                      Debug.logError(e, module);