[ 
https://issues.apache.org/jira/browse/LUCENE-7683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christine Poerschke updated LUCENE-7683:
----------------------------------------
    Description: 
[Scorer.java|https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/search/Scorer.java]
 has non-abstract non-final non-private non-static methods (getChildren, 
getWeight) which the 
[FilterScorer.java|https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/search/FilterScorer.java]
 class does not override.

Proposed changes:
* Option 1: Add the missing methods.
* Option 2: Make the missing methods {{final}} in the non-Filter base class.
* Either way, add {{TestFilterScorer.java}} class similar to 
[TestFilterWeight.java|https://github.com/apache/lucene-solr/blob/master/lucene/core/src/test/org/apache/lucene/search/TestFilterWeight.java]
 class.


Optional bonus (as a separate patch?):
* TestFilterWeight, TestFilterCodecReader, TestMergePolicyWrapper and possibly 
other tests all have {{implTestDeclaredMethodsOverridden(superClass, subClass, 
excusedMethods)}} logic and some sort of [lucene/test-framework 
util|https://github.com/apache/lucene-solr/tree/master/lucene/test-framework/src/java/org/apache/lucene/util]
 FilterTestUtils.java class with a static implTestDeclaredMethodsOverridden 
method could perhaps be factored out.

  was:
[Scorer.java|https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/search/Scorer.java]
 has non-abstract non-final non-private non-static methods (getChildren, 
getWeight, twoPhaseIterator) which the 
[FilterScorer.java|https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/search/FilterScorer.java]
 class does not override.

Proposed changes:
* Option 1: Add the missing methods.
* Option 2: Make the missing methods {{final}} in the non-Filter base class.
* Either way, add {{TestFilterScorer.java}} class similar to 
[TestFilterWeight.java|https://github.com/apache/lucene-solr/blob/master/lucene/core/src/test/org/apache/lucene/search/TestFilterWeight.java]
 class.


Optional bonus (as a separate patch?):
* TestFilterWeight, TestFilterCodecReader, TestMergePolicyWrapper and possibly 
other tests all have {{implTestDeclaredMethodsOverridden(superClass, subClass, 
excusedMethods)}} logic and some sort of [lucene/test-framework 
util|https://github.com/apache/lucene-solr/tree/master/lucene/test-framework/src/java/org/apache/lucene/util]
 FilterTestUtils.java class with a static implTestDeclaredMethodsOverridden 
method could perhaps be factored out.


> FilterScorer to override more super-class methods
> -------------------------------------------------
>
>                 Key: LUCENE-7683
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7683
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Christine Poerschke
>            Priority: Minor
>
> [Scorer.java|https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/search/Scorer.java]
>  has non-abstract non-final non-private non-static methods (getChildren, 
> getWeight) which the 
> [FilterScorer.java|https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/search/FilterScorer.java]
>  class does not override.
> Proposed changes:
> * Option 1: Add the missing methods.
> * Option 2: Make the missing methods {{final}} in the non-Filter base class.
> * Either way, add {{TestFilterScorer.java}} class similar to 
> [TestFilterWeight.java|https://github.com/apache/lucene-solr/blob/master/lucene/core/src/test/org/apache/lucene/search/TestFilterWeight.java]
>  class.
> Optional bonus (as a separate patch?):
> * TestFilterWeight, TestFilterCodecReader, TestMergePolicyWrapper and 
> possibly other tests all have {{implTestDeclaredMethodsOverridden(superClass, 
> subClass, excusedMethods)}} logic and some sort of [lucene/test-framework 
> util|https://github.com/apache/lucene-solr/tree/master/lucene/test-framework/src/java/org/apache/lucene/util]
>  FilterTestUtils.java class with a static implTestDeclaredMethodsOverridden 
> method could perhaps be factored out.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to