PMD Results

The following document contains the results of PMD 7.7.0.

Violations By Priority

Priority 3

org/opentrafficsim/web/OtsWebModel.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'dirtyControls'. 56
SimplifiedTernary This conditional expression can be simplified with || or && 259
SimplifiedTernary This conditional expression can be simplified with || or && 280
CollapsibleIfStatements This if statement could be combined with its parent 377380

org/opentrafficsim/web/OtsWebServer.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'dirtyControls'. 62
SimplifiedTernary This conditional expression can be simplified with || or && 298
SimplifiedTernary This conditional expression can be simplified with || or && 319
CollapsibleIfStatements This if statement could be combined with its parent 416419

org/opentrafficsim/web/TestDemoServer.java

Rule Violation Line
EmptyControlStatement Empty if statement 417432
EmptyControlStatement Empty if statement 421432
EmptyControlStatement Empty if statement 425432
EmptyControlStatement Empty if statement 429432

org/opentrafficsim/web/animation/WebAnimationToggles.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'showAnimationClass': the method is already in a final class 108
UnnecessaryModifier Unnecessary modifier 'final' on method 'hideAnimationClass': the method is already in a final class 118

org/opentrafficsim/web/animation/d2/HtmlAnimationPanel.java

Rule Violation Line
SimplifiedTernary This conditional expression can be simplified with || or && 169
CollapsibleIfStatements This if statement could be combined with its parent 193196
EmptyCatchBlock Avoid empty catch blocks 314317

Priority 4

org/opentrafficsim/web/animation/HtmlDevice.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'GraphicsDevice': 'TYPE_RASTER_SCREEN' is already in scope because it is inherited by an enclosing type 35

Files

org/opentrafficsim/web/OtsWebModel.java

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as 'dirtyControls'. 3 56
SimplifiedTernary This conditional expression can be simplified with || or && 3 259
SimplifiedTernary This conditional expression can be simplified with || or && 3 280
CollapsibleIfStatements This if statement could be combined with its parent 3 377380

org/opentrafficsim/web/OtsWebServer.java

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as 'dirtyControls'. 3 62
SimplifiedTernary This conditional expression can be simplified with || or && 3 298
SimplifiedTernary This conditional expression can be simplified with || or && 3 319
CollapsibleIfStatements This if statement could be combined with its parent 3 416419

org/opentrafficsim/web/TestDemoServer.java

Rule Violation Priority Line
EmptyControlStatement Empty if statement 3 417432
EmptyControlStatement Empty if statement 3 421432
EmptyControlStatement Empty if statement 3 425432
EmptyControlStatement Empty if statement 3 429432

org/opentrafficsim/web/animation/HtmlDevice.java

Rule Violation Priority Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'GraphicsDevice': 'TYPE_RASTER_SCREEN' is already in scope because it is inherited by an enclosing type 4 35

org/opentrafficsim/web/animation/WebAnimationToggles.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on method 'showAnimationClass': the method is already in a final class 3 108
UnnecessaryModifier Unnecessary modifier 'final' on method 'hideAnimationClass': the method is already in a final class 3 118

org/opentrafficsim/web/animation/d2/HtmlAnimationPanel.java

Rule Violation Priority Line
SimplifiedTernary This conditional expression can be simplified with || or && 3 169
CollapsibleIfStatements This if statement could be combined with its parent 3 193196
EmptyCatchBlock Avoid empty catch blocks 3 314317