You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Paul Foxworthy (JIRA)" <ji...@apache.org> on 2011/01/13 05:24:45 UTC

[jira] Created: (OFBIZ-4114) ServiceUtil.returnError called but its result not returned

ServiceUtil.returnError called but its result not returned
----------------------------------------------------------

                 Key: OFBIZ-4114
                 URL: https://issues.apache.org/jira/browse/OFBIZ-4114
             Project: OFBiz
          Issue Type: Bug
          Components: accounting
    Affects Versions: SVN trunk
         Environment: rev 1058379
            Reporter: Paul Foxworthy
            Priority: Minor
             Fix For: SVN trunk


In applications/accounting/src/org/ofbiz/accounting/Invoice/InvoiceServices.java, there are numerous calls to ServiceUtil.returnError where nothing is done with the result of the call. Surely a

return ServiceUtil.returnError

was intended?

A grep turned up one other place with a similar problem, PosTransaction.java .

Patches attached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-4114) ServiceUtil.returnError called but its result not returned

Posted by "Paul Foxworthy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-4114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Foxworthy updated OFBIZ-4114:
----------------------------------

    Attachment: OFBIZ-4114_PosTransaction_returnError_result_not_returned.patch
                OFBIZ-4114_InvoiceServices_returnError_result_not_returned.patch

> ServiceUtil.returnError called but its result not returned
> ----------------------------------------------------------
>
>                 Key: OFBIZ-4114
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4114
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: rev 1058379
>            Reporter: Paul Foxworthy
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4114_InvoiceServices_returnError_result_not_returned.patch, OFBIZ-4114_PosTransaction_returnError_result_not_returned.patch
>
>
> In applications/accounting/src/org/ofbiz/accounting/Invoice/InvoiceServices.java, there are numerous calls to ServiceUtil.returnError where nothing is done with the result of the call. Surely a
> return ServiceUtil.returnError
> was intended?
> A grep turned up one other place with a similar problem, PosTransaction.java .
> Patches attached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-4114) ServiceUtil.returnError called but its result not returned

Posted by "Paul Foxworthy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-4114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986366#action_12986366 ] 

Paul Foxworthy commented on OFBIZ-4114:
---------------------------------------

Doh!

Thanks for your vigilance, Jacques. I didn't pay enough attention after I found the first few incidents of missing return statements. I promise that in future I will ensure Ofbiz builds before I submit a patch :-/.

> ServiceUtil.returnError called but its result not returned
> ----------------------------------------------------------
>
>                 Key: OFBIZ-4114
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4114
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: rev 1058379
>            Reporter: Paul Foxworthy
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Release Branch 09.04, Release Branch 10.04, SVN trunk
>
>         Attachments: OFBIZ-4114_InvoiceServices_returnError_result_not_returned.patch, OFBIZ-4114_PosTransaction_returnError_result_not_returned.patch
>
>
> In applications/accounting/src/org/ofbiz/accounting/Invoice/InvoiceServices.java, there are numerous calls to ServiceUtil.returnError where nothing is done with the result of the call. Surely a
> return ServiceUtil.returnError
> was intended?
> A grep turned up one other place with a similar problem, PosTransaction.java .
> Patches attached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-4114) ServiceUtil.returnError called but its result not returned

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-4114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986372#action_12986372 ] 

Jacques Le Roux commented on OFBIZ-4114:
----------------------------------------

I did not even try to build (I think it would have compile), it was obvious to me. Good catch BTW! 

> ServiceUtil.returnError called but its result not returned
> ----------------------------------------------------------
>
>                 Key: OFBIZ-4114
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4114
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: rev 1058379
>            Reporter: Paul Foxworthy
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Release Branch 09.04, Release Branch 10.04, SVN trunk
>
>         Attachments: OFBIZ-4114_InvoiceServices_returnError_result_not_returned.patch, OFBIZ-4114_PosTransaction_returnError_result_not_returned.patch
>
>
> In applications/accounting/src/org/ofbiz/accounting/Invoice/InvoiceServices.java, there are numerous calls to ServiceUtil.returnError where nothing is done with the result of the call. Surely a
> return ServiceUtil.returnError
> was intended?
> A grep turned up one other place with a similar problem, PosTransaction.java .
> Patches attached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-4114) ServiceUtil.returnError called but its result not returned

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-4114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-4114.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Release Branch 10.04
                   Release Branch 09.04
         Assignee: Jacques Le Roux

Thanks for report Paul,

I have not applied your patch but made the following changes.

# PosTransaction.java (in trunk at r1060261, R10.04 at r1060375, R9.04 at r 1060378.
** As it's not a service but a public method we should not use return ServiceUtil.returnError here but return null
# InvoiceServices.java (in trunk at r1060368, R10.04 at r1060383, R9.04 at r1060385  
** For calcHeaderAdj as it's not a service but a private method we should not use return ServiceUtil.returnError here but BigDecimal.ZERO
** Same for createInvoiceTerms but not return as it returns void
** Fix all other cases by adding return as you suggested






> ServiceUtil.returnError called but its result not returned
> ----------------------------------------------------------
>
>                 Key: OFBIZ-4114
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4114
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: rev 1058379
>            Reporter: Paul Foxworthy
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Release Branch 09.04, Release Branch 10.04, SVN trunk
>
>         Attachments: OFBIZ-4114_InvoiceServices_returnError_result_not_returned.patch, OFBIZ-4114_PosTransaction_returnError_result_not_returned.patch
>
>
> In applications/accounting/src/org/ofbiz/accounting/Invoice/InvoiceServices.java, there are numerous calls to ServiceUtil.returnError where nothing is done with the result of the call. Surely a
> return ServiceUtil.returnError
> was intended?
> A grep turned up one other place with a similar problem, PosTransaction.java .
> Patches attached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.