[ 
https://issues.apache.org/jira/browse/SOLR-14781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17185424#comment-17185424
 ] 

David Smiley commented on SOLR-14781:
-------------------------------------

I used IntelliJ's "Unused declaration" inspection configured just for classes.  
It took some time to run.  I exported the results as an XML file to attach to 
this issue and share; there's a heavy HTML version I have too.  It ran over the 
whole codebase; I propose in this issue ignoring the Lucene ones.

Many (perhaps half?) of the classes are in fact used, referenced via 
configuration files that are loaded dynamically.  It seems IntelliJ didn't 
notice those.  Just an example:  {{org.apache.solr.util.SolrLogLayout}}.  There 
are 201 in Solr.  The analytics module accounts for 68 of them.

One possible way to handle this is to outright remove them all then run tests.  
Tests will expose many to add back.  Finally, share here a list of classes to 
propose to remove for peer review.

> Remove unused classes
> ---------------------
>
>                 Key: SOLR-14781
>                 URL: https://issues.apache.org/jira/browse/SOLR-14781
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: David Smiley
>            Priority: Minor
>              Labels: newdev
>         Attachments: unused.xml
>
>
> There are a number of lingering classes in Solr that are not used anymore, 
> lingering after long-gone refactorings or who knows what.  They should be 
> removed, of course.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to