KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
DataflowAnomalyAnalysis: Found 'DD'-anomaly for variable 'variable' (lines 'n1'-'n2'). DataflowAnomalyAnalysis: Found 'DU'-anomaly for variable 'variable' (lines 'n1'-'n2'). 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. NullAssignment: Assigning an Object to null is a code smell. Consider refactoring. Wouldn't setting an object to null assist in garbage collection, if the object is a local object (not used outside of the method)? Or is that a myth? MethodArgumentCouldBeFinal: Parameter 'param' is not assigned and could be declared final LocalVariableCouldBeFinal: Local variable 'variable' could be declared final Are there any advantages to using final parameters and variables? LooseCoupling: Avoid using implementation types like 'LinkedList'; use the interface instead If I know that I specifically need a LinkedList , 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? AvoidSynchronizedAtMethodLevel: Use block level rather than method level synchronization What advantages does block-level synchronization have over method-level synchronization? AvoidUsingShortType: Do not use the short type My first languages were C and C++, but in the Java world, why should I not use the type that best describes my data?
Tags (comma-separated)
Save Edits
Cancel