You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Anil Patel <ap...@adititechlabs.com> on 2007/06/25 08:38:57 UTC
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/
I think following modification breaks queries to database (Derby in mycase)
- if (conditionList == null && conditionList.size() == 0)
+ if (conditionList == null || conditionList.size() == 0)
Regards
Anil Patel
On 6/24/07, jacopoc@apache.org <ja...@apache.org> wrote:
>
> 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.1reverting 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/
Posted by David E Jones <jo...@hotwaxmedia.com>.
Yeah, it's amazing how low level code changes can cause wide spread problems...
Thanks for fixing that Jacopo, I think the fix is fine. It's funny the way the old bug existed, code that wasn't supposed to be there and by mistake wasn't being used. ;)
-David
Jacopo Cappellato wrote:
> Anil, Scott
>
> yes, I've noticed some problems too (for example in the left bar of the
> catalog main screen); it is fixed in rev. 550384
> Please review my change.
>
> Jacopo
>
>
> Anil Patel wrote:
>> Scott,
>> If we go in Webtools and do find on a table that has data, you should see
>> the error.
>>
>> Regards
>> Anil Patel
>>
>>
>> On 6/24/07, Scott Gray <le...@gmail.com> wrote:
>>>
>>> What error are you getting Anil? Any way I can reproduce it? I can't
>>> see
>>> a
>>> problem with the code changes is all
>>>
>>> Regards
>>> Scott
>>>
>>> On 25/06/07, Anil Patel <ap...@adititechlabs.com> wrote:
>>> >
>>> > I think following modification breaks queries to database (Derby in
>>> > mycase)
>>> >
>>> > - if (conditionList == null && conditionList.size() == 0)
>>> > + if (conditionList == null || conditionList.size() == 0)
>>> >
>>> >
>>> >
>>> > Regards
>>> > Anil Patel
>>> >
>>> >
>>> > On 6/24/07, jacopoc@apache.org <ja...@apache.org> wrote:
>>> > >
>>> > > 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.1reverting 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/
Posted by Jacopo Cappellato <ti...@sastau.it>.
Anil, Scott
yes, I've noticed some problems too (for example in the left bar of the
catalog main screen); it is fixed in rev. 550384
Please review my change.
Jacopo
Anil Patel wrote:
> Scott,
> If we go in Webtools and do find on a table that has data, you should see
> the error.
>
> Regards
> Anil Patel
>
>
> On 6/24/07, Scott Gray <le...@gmail.com> wrote:
>>
>> What error are you getting Anil? Any way I can reproduce it? I can't see
>> a
>> problem with the code changes is all
>>
>> Regards
>> Scott
>>
>> On 25/06/07, Anil Patel <ap...@adititechlabs.com> wrote:
>> >
>> > I think following modification breaks queries to database (Derby in
>> > mycase)
>> >
>> > - if (conditionList == null && conditionList.size() == 0)
>> > + if (conditionList == null || conditionList.size() == 0)
>> >
>> >
>> >
>> > Regards
>> > Anil Patel
>> >
>> >
>> > On 6/24/07, jacopoc@apache.org <ja...@apache.org> wrote:
>> > >
>> > > 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.1reverting 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/
Posted by Anil Patel <ap...@adititechlabs.com>.
Scott,
If we go in Webtools and do find on a table that has data, you should see
the error.
Regards
Anil Patel
On 6/24/07, Scott Gray <le...@gmail.com> wrote:
>
> What error are you getting Anil? Any way I can reproduce it? I can't see
> a
> problem with the code changes is all
>
> Regards
> Scott
>
> On 25/06/07, Anil Patel <ap...@adititechlabs.com> wrote:
> >
> > I think following modification breaks queries to database (Derby in
> > mycase)
> >
> > - if (conditionList == null && conditionList.size() == 0)
> > + if (conditionList == null || conditionList.size() == 0)
> >
> >
> >
> > Regards
> > Anil Patel
> >
> >
> > On 6/24/07, jacopoc@apache.org <ja...@apache.org> wrote:
> > >
> > > 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.1reverting 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/
Posted by Scott Gray <le...@gmail.com>.
What error are you getting Anil? Any way I can reproduce it? I can't see a
problem with the code changes is all
Regards
Scott
On 25/06/07, Anil Patel <ap...@adititechlabs.com> wrote:
>
> I think following modification breaks queries to database (Derby in
> mycase)
>
> - if (conditionList == null && conditionList.size() == 0)
> + if (conditionList == null || conditionList.size() == 0)
>
>
>
> Regards
> Anil Patel
>
>
> On 6/24/07, jacopoc@apache.org <ja...@apache.org> wrote:
> >
> > 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.1reverting 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);
> >
> >
> >
>