You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/06/24 16:17:32 UTC

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/...

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);



Re: 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/

Posted by Jacques Le Roux <ja...@les7arts.com>.
Please Jacopo,

Should r550233 and  r550232 go to release ?

Thanks

Jacques
De : <ja...@apache.org>
> 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
>



De : <ja...@apache.org>
> Author: jacopoc
> Date: Sun Jun 24 07:15:28 2007
> New Revision: 550232
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=550232
> Log:
> Fix from some funny bugs.
>
> Modified:
>     ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
>
> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
> URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?view=diff&rev=550232&r1=550231&r2=550232
> ==============================================================================
> --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original)
> +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Sun Jun 24 07:15:28 2007
> @@ -1688,12 +1688,12 @@
>              Double depth = product.getDouble("shippingDepth");
>
>              // if all are null, see if there is an associated virtual product and get the info of that product
> -            if (height == null & width == null && depth == null) {
> +            if (height == null && width == null && depth == null) {
>                  GenericValue parentProduct = this.getParentProduct();
>                  if (parentProduct != null) {
>                      height = parentProduct.getDouble("shippingHeight");
> -                    width = product.getDouble("shippingWidth");
> -                    depth = product.getDouble("shippingDepth");
> +                    width = parentProduct.getDouble("shippingWidth");
> +                    depth = parentProduct.getDouble("shippingDepth");
>                  }
>              }
>