|
[ https://issues.apache.org/jira/browse/OFBIZ-9824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dennis Balkir updated OFBIZ-9824: --------------------------------- Attachment: OFBIZ-9824_org.apache.ofbiz.content.cms_bugfixes.patch class CmsEvents: - Line 119: used null instead {{contentId}} because it is more clear for the reader and {{contentId}} is null at this point - Line 121: used null instead {{contentId}} because it is more clear for the reader and {{contentId}} is null at this point - Line 324: used null instead {{contentName}} because it is more clear for the reader and {{contentName}} is null at this point (it is even checked for null three lines above and this here is only done IF {{contentName}} is null) class ContentJsonEvents: - Line 84: added a default Locale to {{toLowerCase}} - Line 192: added a null-check for content, which can possibly null at this point > [FB] Package org.apache.ofbiz.content.cms > ----------------------------------------- > > Key: OFBIZ-9824 > URL: https://issues.apache.org/jira/browse/OFBIZ-9824 > Project: OFBiz > Issue Type: Sub-task > Components: content > Affects Versions: Trunk > Reporter: Dennis Balkir > Priority: Minor > Attachments: OFBIZ-9824_org.apache.ofbiz.content.cms_bugfixes.patch > > > --- CmsEvents.java:117, NP_LOAD_OF_KNOWN_NULL_VALUE > NP: Load of known null value in org.apache.ofbiz.content.cms.CmsEvents.cms(HttpServletRequest, HttpServletResponse) > 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). > --- CmsEvents.java:322, NP_LOAD_OF_KNOWN_NULL_VALUE > NP: Load of known null value in org.apache.ofbiz.content.cms.CmsEvents.cms(HttpServletRequest, HttpServletResponse) > 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). > --- ContentJsonEvents.java:83, DM_CONVERT_CASE > Dm: Use of non-localized String.toUpperCase() or String.toLowerCase() in org.apache.ofbiz.content.cms.ContentJsonEvents$1.compare(Map, Map) > A String is being converted to upper or lowercase, using the platform's default encoding. This may result in improper conversions when used with international characters. Use the > String.toUpperCase( Locale l ) > String.toLowerCase( Locale l ) > versions instead. > --- ContentJsonEvents.java:191, NP_NULL_ON_SOME_PATH > NP: Possible null pointer dereference of content in org.apache.ofbiz.content.cms.ContentJsonEvents.getTreeNode(GenericValue) > 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 (v6.4.14#64029) |
| Free forum by Nabble | Edit this page |
