svn commit: r550233 - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/ applications/content/src/org/ofbiz/content/content/ applications/order/src/org/ofbiz/order/shoppinglist/ framework/common/src/org/ofbiz/...

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

svn commit: r550233 - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/ applications/content/src/org/ofbiz/content/content/ applications/order/src/org/ofbiz/order/shoppinglist/ framework/common/src/org/ofbiz/...

jacopoc
Author: jacopoc
Date: Sun Jun 24 07:17:31 2007
New Revision: 550233

URL: http://svn.apache.org/viewvc?view=rev&rev=550233
Log:
Applied patch from Stefan Huehner OFBIZ-730 to fix some very bad conditions that could cause NPE.

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java
    ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityJoinOperator.java

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java?view=diff&rev=550233&r1=550232&r2=550233
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java Sun Jun 24 07:17:31 2007
@@ -300,7 +300,7 @@
         }
 
         if (ver.equals("3.1")) {
-            if (tranKey == null && tranKey.length() <= 0) {
+            if (tranKey == null || tranKey.length() <= 0) {
                 Debug.logInfo("Trankey property required for version 3.1 reverting to 3.0",module);
                 ver = "3.0";
             }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java?view=diff&rev=550233&r1=550232&r2=550233
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java Sun Jun 24 07:17:31 2007
@@ -487,7 +487,7 @@
                     break;
                 } else {
                     Boolean isFollow = (Boolean)currentNode.get("isFollow");
-                    if (isFollow != null || isFollow.booleanValue()) {
+                    if (isFollow != null && isFollow.booleanValue()) {
                         nodeTrail.add(currentNode);
                         boolean foundPick = traverseSubContent(ctx);
                         if (foundPick) {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java?view=diff&rev=550233&r1=550232&r2=550233
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java Sun Jun 24 07:17:31 2007
@@ -552,7 +552,7 @@
             Debug.logError(e, module);
         }
 
-        if (surveyResp != null || surveyResp.size() > 0) {
+        if (surveyResp != null && surveyResp.size() > 0) {
             Iterator respIt = surveyResp.iterator();
             while (respIt.hasNext()) {
                 GenericValue resp = (GenericValue) respIt.next();

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java?view=diff&rev=550233&r1=550232&r2=550233
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java Sun Jun 24 07:17:31 2007
@@ -548,7 +548,7 @@
 
         // security: don't create a user login if the specified partyId (if not empty) already exists
         // unless the logged in user has permission to do so (same partyId or PARTYMGR_CREATE)
-        if (partyId != null || partyId.length() > 0) {
+        if (partyId != null && partyId.length() > 0) {
             //GenericValue party = null;
             //try {
             //    party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId));

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityJoinOperator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityJoinOperator.java?view=diff&rev=550233&r1=550232&r2=550233
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityJoinOperator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityJoinOperator.java Sun Jun 24 07:17:31 2007
@@ -156,7 +156,7 @@
     }
 
     public void validateSql(ModelEntity modelEntity, List conditionList) throws GenericModelException {
-        if (conditionList == null && conditionList.size() == 0)
+        if (conditionList == null || conditionList.size() == 0)
             throw new GenericModelException("Empty list for joining");
         for (int i = 0; i < conditionList.size(); i++) {
             Object condObj = conditionList.get(i);