Project: ActiveMQ :: Openwire Generator
SpotBugs version: 4.8.3
Code analyzed:
3074 lines of code analyzed, in 22 classes, in 1 packages.
Metric | Total | Density* |
---|---|---|
High Priority Warnings | 5 | 1.63 |
Medium Priority Warnings | 13 | 4.23 |
Total Warnings | 18 | 5.86 |
(* Defects per Thousand lines of non-commenting source statements)
Warning Type | Number |
---|---|
Bad practice Warnings | 3 |
Correctness Warnings | 5 |
Internationalization Warnings | 3 |
Malicious code vulnerability Warnings | 6 |
Dodgy code Warnings | 1 |
Total | 18 |
Click on a warning row to see full context information.
Code | Warning |
---|---|
ES | Comparison of String objects using == or != in org.apache.activemq.openwire.tool.JavaTestsGenerator.generateFile(PrintWriter) |
RV | Exceptional return value of java.io.File.mkdirs() ignored in org.apache.activemq.openwire.tool.MultiSourceGenerator.run() |
RV | Exceptional return value of java.io.File.mkdirs() ignored in org.apache.activemq.openwire.tool.SingleSourceGenerator.run() |
Code | Warning |
---|---|
MF | Field CGeneratorTask.target masks field in superclass org.apache.tools.ant.Task |
MF | Field CSharpGeneratorTask.target masks field in superclass org.apache.tools.ant.Task |
MF | Field CSharpMarshallingGenerator.targetDir masks field in superclass org.apache.activemq.openwire.tool.JavaMarshallingGenerator |
MF | Field CppGeneratorTask.target masks field in superclass org.apache.tools.ant.Task |
MF | Field CppMarshallingHeadersGenerator.targetDir masks field in superclass org.apache.activemq.openwire.tool.JavaMarshallingGenerator |
Code | Warning |
---|---|
Dm | Found reliance on default encoding in org.apache.activemq.openwire.tool.JavaMarshallingGenerator.processFactory(): new java.io.FileWriter(File) |
Dm | Found reliance on default encoding in org.apache.activemq.openwire.tool.MultiSourceGenerator.processClass(JClass): new java.io.FileWriter(File) |
Dm | Found reliance on default encoding in org.apache.activemq.openwire.tool.SingleSourceGenerator.run(): new java.io.FileWriter(File) |
Code | Warning |
---|---|
EI | org.apache.activemq.openwire.tool.JavaMarshallingGenerator.getConcreteClasses() may expose internal representation by returning JavaMarshallingGenerator.concreteClasses |
EI | org.apache.activemq.openwire.tool.MultiSourceGenerator.getManuallyMaintainedClasses() may expose internal representation by returning MultiSourceGenerator.manuallyMaintainedClasses |
EI | org.apache.activemq.openwire.tool.SingleSourceGenerator.getManuallyMaintainedClasses() may expose internal representation by returning SingleSourceGenerator.manuallyMaintainedClasses |
EI2 | org.apache.activemq.openwire.tool.JavaMarshallingGenerator.setConcreteClasses(List) may expose internal representation by storing an externally mutable object into JavaMarshallingGenerator.concreteClasses |
EI2 | org.apache.activemq.openwire.tool.MultiSourceGenerator.setManuallyMaintainedClasses(Set) may expose internal representation by storing an externally mutable object into MultiSourceGenerator.manuallyMaintainedClasses |
EI2 | org.apache.activemq.openwire.tool.SingleSourceGenerator.setManuallyMaintainedClasses(Set) may expose internal representation by storing an externally mutable object into SingleSourceGenerator.manuallyMaintainedClasses |
Code | Warning |
---|---|
UrF | Unread public/protected field: org.apache.activemq.openwire.tool.MultiSourceGenerator.buffer |
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 behavior to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.
Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object. If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.
This code stores a reference to an externally mutable object into the internal representation of the object. If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.
This code compares java.lang.String
objects for reference
equality using the == or != operators.
Unless both strings are either constants in a source file, or have been
interned using the String.intern()
method, the same string
value may be represented by two different String objects. Consider
using the equals(Object)
method instead.
This class defines a field with the same name as a visible instance field in a superclass. This is confusing, and may indicate an error if methods update or access one of the fields when they wanted the other.
This method returns a value that is not checked. The return value should be checked
since it can indicate an unusual or unexpected function execution. For
example, the File.delete()
method returns false
if the file could not be successfully deleted (rather than
throwing an Exception).
If you don't check the result, you won't notice if the method invocation
signals unexpected behavior by returning an atypical return value.
This field is never read. The field is public or protected, so perhaps it is intended to be used with classes not seen as part of the analysis. If not, consider removing it from the class.