Release Notes - SonarJava - Version 3.0 - HTML format

Bug

  • [SONARJAVA-645] - Anonymous classes symbols should have supertype or interfaces
  • [SONARJAVA-879] - FP on S2156 : Overriden method should not raise an issue
  • [SONARJAVA-881] - FP S1611 No issue should be raised when type is not infered
  • [SONARJAVA-896] - Array type is not detected as a subtype of object by method resolution
  • [SONARJAVA-901] - ParametrizedTypeType with unknown rawType is tagged as CLASS instead of UNKNOWN
  • [SONARJAVA-910] - S881 FP on return statement with increment operator.
  • [SONARJAVA-915] - S1185: FP for final methods calling only super.equals(), super.hashCode() or super.toString()

New Feature

  • [SONARJAVA-106] - Rule S2301: Rule to detect selector/flag arguments in functions/methods
  • [SONARJAVA-866] - Rule: S2167 "compareTo" should not return "Integer.MIN_VALUE"
  • [SONARJAVA-867] - Rule: S2165 "finalize" should not set fields to "null"
  • [SONARJAVA-868] - Rule: S2175 Inappropriate "Collection" calls should not be made
  • [SONARJAVA-882] - Rule: S2446 "notifyAll" should be used
  • [SONARJAVA-883] - Rule: S2110 Invalid month values should not be used
  • [SONARJAVA-884] - Rule S2122 "ScheduledThreadPoolExecutor" should not have 0 core threads
  • [SONARJAVA-885] - Rule S1872 Classes should not be compared by name
  • [SONARJAVA-886] - Rule S2154: Dissimilar primitive wrappers should not be used with the ternary operator without explicit casting
  • [SONARJAVA-887] - Rule S2123: Values should not be uselessly incremented
  • [SONARJAVA-888] - Rule S2160: Subclasses that add fields should override "equals"
  • [SONARJAVA-889] - Rule S2162: "equals" methods should be symmetric and work for subclasses
  • [SONARJAVA-890] - Rule S2437: Silly bit operations should not be performed
  • [SONARJAVA-892] - Rule S2447 Null should not be returned from a "Boolean" method
  • [SONARJAVA-893] - Rule S2133 Objects should not be created only to "getClass"
  • [SONARJAVA-894] - Rule S2131 Primitives should not be boxed just for "String" conversion
  • [SONARJAVA-895] - Rule S2134 Classes extending java.lang.Thread should override the "run" method
  • [SONARJAVA-898] - Rule S2442: "Lock" objects should not be "synchronized"
  • [SONARJAVA-899] - Rule S2441 : Non-serializable objects should not be stored in "HttpSessions"
  • [SONARJAVA-900] - Rule S2440: Classes with only "static" methods should not be instantiated
  • [SONARJAVA-904] - Rule S2444 Lazy initialization of "static" fields should be "synchronized"
  • [SONARJAVA-912] - Rule S2445: Blocks synchronized on fields should not contain assignments of new objects to those fields
  • [SONARJAVA-913] - Rule S2438: "Threads" should not be used where "Runnables" are expected
  • [SONARJAVA-914] - Rule S2388: Inner class calls to super class methods should be unambiguous

Task

Improvement

  • [SONARJAVA-873] - Updated outdated rules: SQALE, Severity, description.
  • [SONARJAVA-902] - S1221 should also cover badly named equals method (named equal instead of equals)
  • [SONARJAVA-906] - supertype of an interface is java.lang.Object
  • [SONARJAVA-908] - S2197 FP when the modulus operand is a length of String or size of collection

False-Positive

  • [SONARJAVA-917] - FP on S1948: issue on serializable type variable
  • [SONARJAVA-918] - FP on S1948 as arrays of primitive types are serializable

Edit/Copy Release Notes

The text area below allows the project release notes to be edited and copied to another document.