Details

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              mbrohl Michael Brohl
              Reporter:
              jleichert Julian Leichert
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: