ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Leichert (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OFBIZ-9731) [FB] Package org.apache.ofbiz.order.shoppinglist
Date Thu, 21 Sep 2017 11:16:00 GMT

     [ https://issues.apache.org/jira/browse/OFBIZ-9731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Julian Leichert updated OFBIZ-9731:
    Attachment: OFBIZ-9731_org.apache.ofbiz.order.shoppinglist_bugfixes.patch

class ShoppingListEvents
 - removed useless String eventMessage and isNotEmpty(eventMessage)
 - line 328 : changed catch to NumberFormatException
 - line 413 : removed redundant null-check
 - line 415 : unnecessary to check if array.length 0 , due to prior check

class ShoppingListServices
 - line 147 : removed redundant null-check
 - line 185 : surrounded with try-catch(NPE)

> [FB] Package org.apache.ofbiz.order.shoppinglist
> ------------------------------------------------
>                 Key: OFBIZ-9731
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9731
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: order
>    Affects Versions: Trunk
>            Reporter: Julian Leichert
>            Priority: Minor
>         Attachments: OFBIZ-9731_org.apache.ofbiz.order.shoppinglist_bugfixes.patch
> ShoppingListEvents.java:194, NP_LOAD_OF_KNOWN_NULL_VALUE┬┤
> - NP: Load of known null value in org.apache.ofbiz.order.shoppinglist.ShoppingListEvents.addListToCart(HttpServletRequest,
> The variable referenced at this point is known to be null due to an earlier check against
null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different
variable, or perhaps the earlier check to see if the variable is null should have been a check
to see if it was non-null).
> ShoppingListEvents.java:328, DE_MIGHT_IGNORE
> - DE: org.apache.ofbiz.order.shoppinglist.ShoppingListEvents.replaceShoppingListItem(HttpServletRequest,
HttpServletResponse) might ignore java.lang.Exception
> This method might ignore an exception.  In general, exceptions should be handled or reported
in some way, or they should be thrown out of the method.
> - RCN: Redundant nullcheck of itemsArray, which is known to be non-null in org.apache.ofbiz.order.shoppinglist.ShoppingListEvents.fillAutoSaveList(ShoppingCart,
> This method contains a redundant check of a known non-null value against the constant
> - RCN: Nullcheck of recurrenceInfo at line 147 of value previously dereferenced in org.apache.ofbiz.order.shoppinglist.ShoppingListServices.createListReorders(DispatchContext,
> A value is checked here to see whether it is null, but this value can't be null because
it was previously dereferenced and if it were null a null pointer exception would have occurred
at the earlier dereference. Essentially, this code and the previous dereference disagree as
to whether this value is allowed to be null. Either the check is redundant or the previous
dereference is erroneous.
> ShoppingListServices.java:178, NP_NULL_ON_SOME_PATH
> - NP: Possible null pointer dereference of createResp in org.apache.ofbiz.order.shoppinglist.ShoppingListServices.createListReorders(DispatchContext,
> There is a branch of statement that, if executed, guarantees that a null value will be
dereferenced, which would generate a NullPointerException when the code is executed. Of course,
the problem might be that the branch or statement is infeasible and that the null pointer
exception can't ever be executed; deciding that is beyond the ability of FindBugs. 

This message was sent by Atlassian JIRA

View raw message