[VTN-71] [Lithium] Reduce sonar warnings. Created: 12/Jun/15  Updated: 19/Oct/17  Resolved: 19/Jun/15

Status: Resolved
Project: vtn
Component/s: VTN Manager
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Shigeru Yasuda Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 3684

 Description   

We should reduce sonar warnings as possible for Lithium release though they are harmless.



 Comments   
Comment by Shigeru Yasuda [ 15/Jun/15 ]

https://git.opendaylight.org/gerrit/22438 (master)
https://git.opendaylight.org/gerrit/22557 (stable/lithium)

  • "equals(Object obj)" and "hashCode()" should be overridden in pairs
  • Throwable and Error classes should not be caught

https://git.opendaylight.org/gerrit/22441 (master)
https://git.opendaylight.org/gerrit/22558 (stable/lithium)

  • Security - Array is stored directly
  • Methods named "equals" should override Object.equals(Object)
  • Throwable.printStackTrace(...) should never be called
  • "object == null" should be used instead of "object.equals(null)"
Comment by Shigeru Yasuda [ 16/Jun/15 ]

https://git.opendaylight.org/gerrit/22563 (master)
https://git.opendaylight.org/gerrit/22664 (stable/lithium)

  • Unused private fields should be removed
  • Unused local variables should be removed
  • Avoid Throwing Null Pointer Exception
  • Constructor Calls Overridable Method
  • Try-catch blocks should not be nested
  • Collapsible "if" statements should be merged
  • Utility classes should not have a public constructor
  • Unused formal parameter
  • Unnecessary Local Before Return
  • Nested blocks of code should not be left empty
  • Declarations should use Java collection interfaces such as "List"
    rather than specific implementation classes such as "LinkedList"
  • Generic exceptions Error, RuntimeException, Throwable and Exception
    should never be thrown
Comment by Shigeru Yasuda [ 19/Jun/15 ]

https://git.opendaylight.org/gerrit/22961 (master)
https://git.opendaylight.org/gerrit/22918 (stable/lithium)

  • Missing Static Method In Non Instantiatable Class
  • Unnecessary Local Before Return
  • Expressions should not be too complex
  • Methods should not be too complex
  • Declarations should use Java collection interfaces such as "List"
    rather than specific implementation classes such as "LinkedList"
  • Exception handlers should preserve the original exception
Generated at Wed Feb 07 20:47:56 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.