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

Uwe Schindler commented on LUCENE-10137:
----------------------------------------

IMHO, LongValues should be a functional interface from the beginning! This is a 
bit related here, but would simplify code more. Having LongValues an abstract 
class with only one abstract method makes no sense to me.

In general we should look into converting many abstract classes to interfaces 
in Lucene.

> Refactor DirectReader and remove heavy code duplication
> -------------------------------------------------------
>
>                 Key: LUCENE-10137
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10137
>             Project: Lucene - Core
>          Issue Type: Task
>          Components: core/other
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> DirectReader creates a dozen of inner classes blowing up the JAR file that 
> just contain the same code over an over.
> This issue will refactor DirectReader like this:
> - Let DirectReader implement LongValues directly
> - The LongValues get method is implemented by calling LongUnaryOperator 
> functional interface
> - the LongUnaryOperator is a method reference to one of the new private 
> getXY() methods, which are specialization for all supported bit sizes.



--
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