PMD Results

The following document contains the results of PMD 5.0.2.

Files

org/andromda/maven/plugin/site/AbstractSiteMojo.java

Violation Line
Found non-transient, non-static member. Please mark as transient or provide accessors. 30
Parameter 'destFile' is not assigned and could be declared final 40
Parameter 'sourceFile' is not assigned and could be declared final 40
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 59
Parameter 'location' is not assigned and could be declared final 72
Parameter 'file' is not assigned and could be declared final 72
Avoid printStackTrace(); use a logger call instead. 91
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 95
Avoid printStackTrace(); use a logger call instead. 97

org/andromda/maven/plugin/site/CopyDocumentationMojo.java

Violation Line
Found non-transient, non-static member. Please mark as transient or provide accessors. 27
Found non-transient, non-static member. Please mark as transient or provide accessors. 34
Found non-transient, non-static member. Please mark as transient or provide accessors. 41
Found non-transient, non-static member. Please mark as transient or provide accessors. 48
Found non-transient, non-static member. Please mark as transient or provide accessors. 55
Found non-transient, non-static member. Please mark as transient or provide accessors. 62
Found non-transient, non-static member. Please mark as transient or provide accessors. 69
Found non-transient, non-static member. Please mark as transient or provide accessors. 76
Found non-transient, non-static member. Please mark as transient or provide accessors. 91
A catch statement should never catch throwable since it includes errors. 133
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. 135
A catch statement should never catch throwable since it includes errors. 167
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. 169
Local variable 'file' could be declared final 196
Avoid instantiating new objects inside loops 203
A catch statement should never catch throwable since it includes errors. 207
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. 209
Local variable 'filter' could be declared final 238 - 266
Parameter 'dir' is not assigned and could be declared final 254
Parameter 'name' is not assigned and could be declared final 254
Local variable 'file' could be declared final 268
Avoid instantiating new objects inside loops 272 - 274
A catch statement should never catch throwable since it includes errors. 277
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. 279

org/andromda/maven/plugin/site/NamespaceTransformerMojo.java

Violation Line
Found non-transient, non-static member. Please mark as transient or provide accessors. 29
Found non-transient, non-static member. Please mark as transient or provide accessors. 36
Found non-transient, non-static member. Please mark as transient or provide accessors. 54
Found non-transient, non-static member. Please mark as transient or provide accessors. 61
Found non-transient, non-static member. Please mark as transient or provide accessors. 66
A catch statement should never catch throwable since it includes errors. 98
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. 100

org/andromda/maven/plugin/site/ProfileTransformerMojo.java

Violation Line
Found non-transient, non-static member. Please mark as transient or provide accessors. 29
Found non-transient, non-static member. Please mark as transient or provide accessors. 36
Found non-transient, non-static member. Please mark as transient or provide accessors. 54
Found non-transient, non-static member. Please mark as transient or provide accessors. 61
Found non-transient, non-static member. Please mark as transient or provide accessors. 66
A catch statement should never catch throwable since it includes errors. 97
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. 99

org/andromda/maven/plugin/site/UnpackDocumentationMojo.java

Violation Line
Found non-transient, non-static member. Please mark as transient or provide accessors. 26
Found non-transient, non-static member. Please mark as transient or provide accessors. 33
Found non-transient, non-static member. Please mark as transient or provide accessors. 40
Avoid excessively long variable names like umlDocCarRentalSampleOutputDirectory 47
Found non-transient, non-static member. Please mark as transient or provide accessors. 47
Found non-transient, non-static member. Please mark as transient or provide accessors. 62
A catch statement should never catch throwable since it includes errors. 100
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. 102
A catch statement should never catch throwable since it includes errors. 132
An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. 134

org/andromda/maven/plugin/site/XslTransformer.java

Violation Line
Avoid unused imports such as 'javax.xml.parsers.ParserConfigurationException' 13
Avoid unused imports such as 'javax.xml.parsers.ParserConfigurationException' 13
Parameter 'projectNameIn' is not assigned and could be declared final 55
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 76
Avoid throwing raw exception types. 78
Deeply nested if..then statements are hard to read 113 - 128
Local variable 'fwriter' could be declared final 122
Local variable 'writer' could be declared final 123
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 132
Avoid throwing raw exception types. 134
Parameter 'url' is not assigned and could be declared final 147
A method/constructor shouldnt explicitly throw java.lang.Exception 148
A method/constructor shouldnt explicitly throw java.lang.Exception 148
Local variable 'factory' could be declared final 150
Local variable 'builder' could be declared final 151
Found non-transient, non-static member. Please mark as transient or provide accessors. 168
Private field 'xmlDocument' could be made final; it is only initialized in the declaration or constructor. 168
This call to String.startsWith can be rewritten using String.charAt(0) 201
Local variable 'uri' could be declared final 212 - 215
Deeply nested if..then statements are hard to read 224 - 227
Parameter 'documentBuffer' is not assigned and could be declared final 242
A method/constructor shouldnt explicitly throw java.lang.Exception 243
A method/constructor shouldnt explicitly throw java.lang.Exception 243
Local variable 'reader' could be declared final 245
Local variable 'document' could be declared final 246
Parameter 'projectName' is not assigned and could be declared final 287