[ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475418 ]
Doug Cutting commented on LUCENE-811: ------------------------------------- > for a package-private final class, marking un-inherited > methods/fields public doesn't enable any additional access Right. You were switching several such methods from public to package-private, which is a no-op and prompted my comment. On the other-hand, if the class is ever made public, it may be useful to have its intended public API pre-declared, and, even if it's never made public, declaring some methods public has some documentation value. In general, the style I prefer is try to declare fields and methods as though each class were public. Package-private methods and fields are really only required for classes that actually are public but that wish to hide some things from all but others in their package. This is a fine point, and doesn't warrant too much analysis. I probably should have just held my tongue. > Public API inconsistency > ------------------------ > > Key: LUCENE-811 > URL: https://issues.apache.org/jira/browse/LUCENE-811 > Project: Lucene - Java > Issue Type: Bug > Components: Index > Affects Versions: 2.1 > Environment: 2.1.0 release > Reporter: Andrzej Bialecki > Assigned To: Michael McCandless > Priority: Minor > Attachments: LUCENE-811.patch > > > org.apache.lucene.index.SegmentInfos is public, and contains public methods > (which is good for expert-level index manipulation tools such as Luke). > However, SegmentInfo class has package visibility. This leads to a strange > result that it's possible to read SegmentInfos, but it's not possible to > access its details (SegmentInfos.info(int)) from a user application. > The solution is to make SegmentInfo class public. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]