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-9721) [FB] Package org.apache.ofbiz.entityext.data
Date Thu, 14 Sep 2017 11:05:00 GMT

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

Julian Leichert updated OFBIZ-9721:
-----------------------------------
    Attachment: OFBIZ-9721_org.apache.ofbiz.entityext.data_bugfixes.patch

> [FB] Package org.apache.ofbiz.entityext.data
> --------------------------------------------
>
>                 Key: OFBIZ-9721
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9721
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: ALL APPLICATIONS, ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Julian Leichert
>            Priority: Minor
>         Attachments: OFBIZ-9721_org.apache.ofbiz.entityext.data_bugfixes.patch
>
>
> EntityDataLoadContainer.java:462, DM_CONVERT_CASE
> - Dm: Use of non-localized String.toUpperCase() or String.toLowerCase() in org.apache.ofbiz.entityext.data.EntityDataLoadContainer.loadContainer()
> 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.
> EntityDataServices.java:176, DM_DEFAULT_ENCODING
> - Dm: Found reliance on default encoding in org.apache.ofbiz.entityext.data.EntityDataServices.getFileList(File):
new java.io.FileReader(File)
> Found a call to a method which will perform a byte to String (or String to byte) conversion,
and will assume that the default platform encoding is suitable. This will cause the application
behaviour to vary between platforms. Use an alternative API and specify a charset name or
Charset object explicitly.
> EntityDataServices.java:204, NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
> - NP: Possible null pointer dereference in org.apache.ofbiz.entityext.data.EntityDataServices.getFileList(File)
due to return value of called method
> The return value from a method is dereferenced without a null check, and the return value
of that method is one that should generally be checked for null. This may lead to a NullPointerException
when the code is executed.
> EntityDataServices.java:225, DM_DEFAULT_ENCODING
> - Dm: Found reliance on default encoding in org.apache.ofbiz.entityext.data.EntityDataServices.readEntityHeader(File,
String, BufferedReader): new java.io.FileReader(File)
> Found a call to a method which will perform a byte to String (or String to byte) conversion,
and will assume that the default platform encoding is suitable. This will cause the application
behaviour to vary between platforms. Use an alternative API and specify a charset name or
Charset object explicitly.
> EntityDataServices.java:225, OS_OPEN_STREAM
> - OS: org.apache.ofbiz.entityext.data.EntityDataServices.readEntityHeader(File, String,
BufferedReader) may fail to close stream
> The method creates an IO stream object, does not assign it to any fields, pass it to
other methods that might close it, or return it, and does not appear to close the stream on
all paths out of the method.  This may result in a file descriptor leak.  It is generally
a good idea to use a finally block to ensure that streams are closed.
> EntityDataServices.java:246, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of entityName, which is known to be non-null in org.apache.ofbiz.entityext.data.EntityDataServices.readEntityFile(File,
String, Delegator)
> This method contains a redundant check of a known non-null value against the constant
null.
> EntityDataServices.java:250, DM_DEFAULT_ENCODING
> - Dm: Found reliance on default encoding in org.apache.ofbiz.entityext.data.EntityDataServices.readEntityFile(File,
String, Delegator): new java.io.FileReader(File)
> Found a call to a method which will perform a byte to String (or String to byte) conversion,
and will assume that the default platform encoding is suitable. This will cause the application
behaviour to vary between platforms. Use an alternative API and specify a charset name or
Charset object explicitly.
> EntityDataServices.java:268, DLS_DEAD_LOCAL_STORE
> - DLS: Dead store to newValue in org.apache.ofbiz.entityext.data.EntityDataServices.readEntityFile(File,
String, Delegator)
> This instruction assigns a value to a local variable, but the value is not read or used
in any subsequent instruction. Often, this indicates an error, because the value computed
is never used.
> Note that Sun's javac compiler often generates dead stores for final local variables.
Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message