[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-4044) Review unused strings from Messages classes as reported by UCDetector

Sean Flanigan (JIRA) jira-events at lists.jboss.org
Thu Apr 2 19:53:22 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBIDE-4044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12460393#action_12460393 ] 

Sean Flanigan commented on JBIDE-4044:
--------------------------------------

Thanks for the work so far!

Is there any sign of false positives in those places?  Max suggested in the forum that there could be a lot of false positives in this list.  If there's something about the JBoss Tools codebase that means Eclipse can't reliably detect unused messages (is someone using reflection on NLS/Messages classes?), I would really like to understand!

I'm happy to delete these messages myself, but I first wanted to check that I wasn't making some fundamental error.


> Review unused strings from Messages classes as reported by UCDetector
> ---------------------------------------------------------------------
>
>                 Key: JBIDE-4044
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-4044
>             Project: Tools (JBoss Tools)
>          Issue Type: Task
>          Components: Cleanup
>    Affects Versions: 3.1.0
>            Reporter: Sean Flanigan
>         Attachments: unused_messages_in_jbosstools.zip
>
>
> I've run UCDetector [1] against the codebase, and it has found 294
> fields in *Messages classes which have 0 references.  I've attached a
> list (views well in oocalc).  I'd like to remove them, along with their
> corresponding resourcebundle properties, to reduce the number of
> translatable strings before localisation begins.
> I think it should be safe to remove these fields, since any direct usage will be caught by the compiler as soon as we try to remove it (and wouldn't have been listed by UCDetector anyway, unless it is completely broken), and it would be extremely unlikely for anyone to access a Messages field by reflection.
> If you want to run UCDetector yourself, select one or more plugin projects (not features, not non-Java projects), select UCDetector/Detect unnecessary code, and wait.  I recommend configuring Eclipse's Problems view to show problems of type "UCDetector Marker (References)" whose description contains 'Field "'.  The relevant problems are of the form 'Field SomethingMessages.SOME_KEY" has 0 references'.  
> [1] http://ucdetector.sourceforge.net/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list