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

ASF subversion and git services commented on LUCENE-10467:
----------------------------------------------------------

Commit 6b82e600a8f8e2dcfd182bcaf58a3434e9a05b3f in lucene's branch 
refs/heads/main from Yuting Gan
[ https://gitbox.apache.org/repos/asf?p=lucene.git;h=6b82e600a8f ]

LUCENE-10467: Throws IllegalArgumentException for getAllDims and getTopChildren 
if topN <= 0 (#751)



> Throws IllegalArgumentException for getAllDims and getTopChildren if topN <= 0
> ------------------------------------------------------------------------------
>
>                 Key: LUCENE-10467
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10467
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/facet
>            Reporter: Yuting Gan
>            Priority: Minor
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Currently, there are different behaviors from subclass that implements  and 
> overrides getAllDims and getTopChildren when passing in an invalid TopN 
> parameter (topN <= 0). Some overridden implementations throw a 
> NullPointerException, some throw an IllegalArgumentException, and others 
> throw no exception.
> It would provide a better user experience by consistently throwing an 
> IllegalArgumentException when requesting topN <= 0 for these two 
> functionalities across all implementations.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to