lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LUCENE-6266) Remove unnecessary Directory parameters from SIS/SIPC/SI
Date Fri, 20 Feb 2015 18:48:13 GMT

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

Robert Muir resolved LUCENE-6266.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 5.1
                   Trunk

> Remove unnecessary Directory parameters from SIS/SIPC/SI
> --------------------------------------------------------
>
>                 Key: LUCENE-6266
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6266
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>             Fix For: Trunk, 5.1
>
>         Attachments: LUCENE-6266.patch
>
>
> A few methods take Directory where it makes no sense:
> {code}
> Collection SegmentInfos.files(Directory dir, boolean includeSegmentsFile);
> String SegmentInfos.toString(Directory dir);
> String SegmentCommitInfo.toString(Directory dir, int pendingDelCount);
> String SegmentInfo.toString(Directory dir, int delCount);
> {code}
> The incoming Directory parameter for files() is bogus, if assertions are enabled, it
fails if any underlying segment's 'dir' differs. But if assertions are not enabled, it just
silently drops them. If we want to add safety around this kind of thing, this is not the way.
> For toString(), it just makes the API hard to use for everyone. This change means commits
have a working Object.toString() method.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message