You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Erick Erickson (Jira)" <ji...@apache.org> on 2020/09/01 01:58:00 UTC

[jira] [Commented] (SOLR-14781) Remove unused classes

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

Erick Erickson commented on SOLR-14781:
---------------------------------------

Yes, this inspection is available from the Community Edition, but after looking at a few of these, it's a rat's nest that I'm not going to have time to really tackle so I'll un-assign it. Take BooleanSimilarityFactory. The inspection claims it's unused, but then over in TestBooleanSimilarityFactory there's this 

{code}
BooleanSimilarity sim = getSimilarity("text", BooleanSimilarity.class);
{code}

which, of course, fails when you remove BooleanSimilarityFactory. So I'd assume if you decide to put this factory in your schema and it had been removed you'd be in trouble. So then I'm stuck _hoping_ that anything like this has a test to cover it...

I suppose this is a variant of what you pointed out of something "referenced via configuration files that are loaded dynamically".

This annotation in SolrLogLayout is scary
{code} "@SuppressForbidden(reason = "class is specific to log4j2"){code}
It takes a bit of digging (and prodding long unused memories) to figure out that that class was used when we had a custom layout before MDC logging was in place and _is_ safe to delete.

So each one would take a lot more thought than I'm willing to give it in the foreseeable future.

Let's go ahead and nuke SolrLogLayout if anyone wants to...

> 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
>            Assignee: Erick Erickson
>            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-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org