You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Andrzej Bialecki (JIRA)" <ji...@apache.org> on 2007/02/22 10:13:05 UTC

[jira] Created: (LUCENE-811) Public API inconsistency

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 
            Priority: Minor


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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-811) Public API inconsistency

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475178 ] 

Doug Cutting commented on LUCENE-811:
-------------------------------------

I think making some methods public is fine, so long as the class is kept package-private.

> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-811) Public API inconsistency

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475121 ] 

Michael McCandless commented on LUCENE-811:
-------------------------------------------

Indeed I did this as part of LUCENE-701, but I can't remember what on
earth my reasoning was.

I agree it's not necessary and we should make it package protected
again.  I can make this fix.

Could we release a 2.0.1 that would include this (and anything else if
we need to)?  I would volunteer to do the release mechanics since I
caused this (sorry) :(

I will also review what else I made public, and, be more careful in
the future to not relax protection unless it's absolutely needed.


> 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 
>            Priority: Minor
>
> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-811) Public API inconsistency

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless resolved LUCENE-811.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2

This is resolved.  If we do a 2.1.1 then I will backport to the 2.1 branch at that time.

> 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
>             Fix For: 2.2
>
>         Attachments: LUCENE-811-take2.patch, 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-811) Public API inconsistency

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475132 ] 

Hoss Man commented on LUCENE-811:
---------------------------------

since SegmentInfos is final, and all of it's methods are (at best) package protected i don't think it's a big risk to make it private again (without requiring a bump to lucene-3.0.0)

I'm not sure if re-privatizing this class really neccessitates a 2.1.1 release ... it doesn't cause any bugs, and it does't really give people very much rope to hang themselves with unless they are going out of their way to put stuff in the org.apache.lucene.index package.

> 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
>
> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: [jira] Updated: (LUCENE-811) Public API inconsistency

Posted by robert engels <re...@ix.netcom.com>.
Actually, scratch that request. As long as they are package level, I  
can put the class in the same package. Problem was that in the past  
some important states fields have been private.

On Feb 22, 2007, at 4:04 PM, robert engels wrote:

> I think the getters need to be public, as it makes many of the  
> 'cache by segment' code much cleaner. Currently I cannot subclass  
> and must replace the class in the jar because I need access to much  
> o this information.
>
> Is there some reason not to make the getters be public, (or copy on  
> read public)?
>
> On Feb 22, 2007, at 3:56 PM, Michael McCandless (JIRA) wrote:
>
>>
>>      [ https://issues.apache.org/jira/browse/LUCENE-811? 
>> page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>
>> Michael McCandless updated LUCENE-811:
>> --------------------------------------
>>
>>     Attachment: LUCENE-811.patch
>>
>> Attaching proposed patch to change SegmentInfos (and all of its  
>> methods/fields) back to package level protection.
>>
>> I also found a few other cases (IndexFileNames,  
>> IndexFileNamesFilter, SegmentInfo) that I had added public methods  
>> which should be kept at package protection.
>>
>>> 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: java-dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-dev-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>


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


Re: [jira] Updated: (LUCENE-811) Public API inconsistency

Posted by robert engels <re...@ix.netcom.com>.
I think the getters need to be public, as it makes many of the 'cache  
by segment' code much cleaner. Currently I cannot subclass and must  
replace the class in the jar because I need access to much o this  
information.

Is there some reason not to make the getters be public, (or copy on  
read public)?

On Feb 22, 2007, at 3:56 PM, Michael McCandless (JIRA) wrote:

>
>      [ https://issues.apache.org/jira/browse/LUCENE-811? 
> page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Michael McCandless updated LUCENE-811:
> --------------------------------------
>
>     Attachment: LUCENE-811.patch
>
> Attaching proposed patch to change SegmentInfos (and all of its  
> methods/fields) back to package level protection.
>
> I also found a few other cases (IndexFileNames,  
> IndexFileNamesFilter, SegmentInfo) that I had added public methods  
> which should be kept at package protection.
>
>> 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: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>


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


[jira] Updated: (LUCENE-811) Public API inconsistency

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-811:
--------------------------------------

    Attachment: LUCENE-811.patch

Attaching proposed patch to change SegmentInfos (and all of its methods/fields) back to package level protection.

I also found a few other cases (IndexFileNames, IndexFileNamesFilter, SegmentInfo) that I had added public methods which should be kept at package protection.

> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-811) Public API inconsistency

Posted by "Andrzej Bialecki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475193 ] 

Andrzej Bialecki  commented on LUCENE-811:
------------------------------------------

I'm fine with making these classes package-private - Luke already uses a "gateway" class to access SegmentInfo, IndexFileDeleter & friends.

> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-811) Public API inconsistency

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475124 ] 

Michael McCandless commented on LUCENE-811:
-------------------------------------------

Sorry, make that 2.1.1 above!

> 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
>
> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-811) Public API inconsistency

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475104 ] 

Doug Cutting commented on LUCENE-811:
-------------------------------------

Rather I think we should consider making SegmentInfos package-private again.  This was made public by LUCENE-701.  Is it too late to hide it again?  Is this really an API we want to support long-term?  If there are individual methods that we wish to expose, perhaps they can instead be exposed through IndexReader or IndexWriter.  It is a slippery slope to now start making things it references public.

Perhaps we should in the future try to separate interfaces and implementations into separate packages.  The implementation package could be named something like 'index2impl' with the understanding that its public API will not be supported long-term.  But, until we do something like that, I think package-private works well.  Tools like Luke can add classes to the package in order to access package-private stuff.

> 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 
>            Priority: Minor
>
> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: [jira] Commented: (LUCENE-811) Public API inconsistency

Posted by robert engels <re...@ix.netcom.com>.
worrying about reflection "security" in a library is pointless. any  
real security needs to be accomplished using server isolation, and/or  
data access/encryption


On Feb 23, 2007, at 1:11 PM, Daniel John Debrunner (JIRA) wrote:

>
>     [ https://issues.apache.org/jira/browse/LUCENE-811? 
> page=com.atlassian.jira.plugin.system.issuetabpanels:comment- 
> tabpanel#action_12475439 ]
>
> Daniel John Debrunner commented on LUCENE-811:
> ----------------------------------------------
>
> Doesn't making such methods public mean they can be called trough  
> reflection?
>
>> 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: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>


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


[jira] Commented: (LUCENE-811) Public API inconsistency

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475439 ] 

Daniel John Debrunner commented on LUCENE-811:
----------------------------------------------

Doesn't making such methods public mean they can be called trough reflection?

> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-811) Public API inconsistency

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-811) Public API inconsistency

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475436 ] 

Michael McCandless commented on LUCENE-811:
-------------------------------------------

Ahhh, OK, I see.  I like that style (declaring fields/methods public
even when the class is package-private).  I will re-work that patch
based on this.

> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-811) Public API inconsistency

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475311 ] 

Michael McCandless commented on LUCENE-811:
-------------------------------------------

> I think making some methods public is fine, so long as the class is
> kept package-private.

But, for a package-private final class, marking un-inherited
methods/fields public doesn't enable any additional access since the
class itself is only visible within the package (I think)?  Or am I
missing something basic about Java's access protections?


> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-811) Public API inconsistency

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-811:
--------------------------------------

    Attachment: LUCENE-811-take2.patch

OK fixed the patch to leave some fields/methods public.

> 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-take2.patch, 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Assigned: (LUCENE-811) Public API inconsistency

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless reassigned LUCENE-811:
-----------------------------------------

    Assignee: Michael McCandless

> 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
>
> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org