Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the reason for these PMD rules?
    text
    copied!<blockquote> <p>DataflowAnomalyAnalysis: Found 'DD'-anomaly for variable 'variable' (lines 'n1'-'n2').</p> <p>DataflowAnomalyAnalysis: Found 'DU'-anomaly for variable 'variable' (lines 'n1'-'n2').</p> </blockquote> <p>DD and DU sound familiar...I want to say in things like testing and analysis relating to weakest pre and post conditions, but I don't remember the specifics.</p> <blockquote> <p>NullAssignment: Assigning an Object to null is a code smell. Consider refactoring.</p> </blockquote> <p>Wouldn't setting an object to <code>null</code> assist in garbage collection, if the object is a local object (not used outside of the method)? Or is that a myth?</p> <blockquote> <p>MethodArgumentCouldBeFinal: Parameter 'param' is not assigned and could be declared final</p> <p>LocalVariableCouldBeFinal: Local variable 'variable' could be declared final</p> </blockquote> <p>Are there any advantages to using <code>final</code> parameters and variables?</p> <blockquote> <p>LooseCoupling: Avoid using implementation types like 'LinkedList'; use the interface instead</p> </blockquote> <p>If I know that I specifically need a <code>LinkedList</code>, why would I not use one to make my intentions explicitly clear to future developers? It's one thing to return the class that's highest up the class path that makes sense, but why would I not declare my variables to be of the strictest sense?</p> <blockquote> <p>AvoidSynchronizedAtMethodLevel: Use block level rather than method level synchronization</p> </blockquote> <p>What advantages does block-level synchronization have over method-level synchronization?</p> <blockquote> <p>AvoidUsingShortType: Do not use the short type</p> </blockquote> <p>My first languages were C and C++, but in the Java world, why should I not use the type that best describes my data?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload