Menu

#611 Unused Imports causes Null class name

open
nobody
None
5
2012-10-07
2006-11-30
Brian Fox
No

Any unused import warning results in a null classname being specified in the results xml file. (i think the tag is completely missing)

Discussion

  • Brian Fox

    Brian Fox - 2006-11-30

    Logged In: YES
    user_id=805618
    Originator: YES

    <pmd version="3.7" timestamp="2006-11-15T10:51:57.866" elapsedtime="0s">
    <file name="G:\checkout\dsms-3.0\application\client-management-application\src\main\java\com\stchome\dsms\appl\formdatasources\clientmanagement\ClientRegistryDataHelper.java">
    <violation line="15" rule="UnusedImports" ruleset="Import Statement Rules" package="com.stchome.dsms.appl.formdatasources.clientmanagement" externalinfourl="http://pmd.sourceforge.net/rules/imports.html#UnusedImports" priority="4">
    Avoid unused imports such as 'com.stchome.dsms.appl.formdatasources.clientmanagement.util.AppResource'
    </violation>
    </file>
    </pmd>

     
  • Tom Copeland

    Tom Copeland - 2006-11-30

    Logged In: YES
    user_id=5159
    Originator: NO

    Hi Brian -

    Hm, yes, I think the 'class' attribute is not there because a source file can contain multiple class files. I suppose we could use the top-level class name...

    Yours,

    tom

     

Log in to post a comment.