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.