You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Michael Goddard <go...@saic.com> on 2007/03/05 21:07:08 UTC

Visibility of RegexCapabilities interface?

Hi,

When I updated to the latest version of Lucene (Rev 514838), I noticed 
that one of my classes would no longer compile.  The error message I got was

   PFRegexCapabilities.java:3: 
org.apache.lucene.search.regex.RegexCapabilities is not public in 
org.apache.lucene.search.regex; cannot be accessed from outside package

Because I'm using the setRegexImplementation(RegexCapabilities impl) 
method of RegexQuery, and have created my own class to implement the 
RegexCapabilities interface, the only way I can see to get this to work 
is to make this interface public.  Is that a reasonable thing to do with 
this interface?  If so, perhaps the attached patch will do the trick.

Thanks.

	Mike

Re: Visibility of RegexCapabilities interface?

Posted by Michael Goddard <go...@saic.com>.
Erik and Chris,

Thank you for reviewing this.  All is good now.

   Mike


Erik Hatcher wrote:
> 
> On Mar 6, 2007, at 2:27 PM, Chris Hostetter wrote:
>> :    PFRegexCapabilities.java:3:
>> : org.apache.lucene.search.regex.RegexCapabilities is not public in
>> : org.apache.lucene.search.regex; cannot be accessed from outside package
>>
>> It looks like this *may* have been a mistake, the commit message says
>> "Many javadoc additions, and adding ASL to each file" ...
>>
>> http://svn.apache.org/viewvc/lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex/RegexCapabilities.java?r1=359526&r2=381108 
>>
>>
>> ...but one other interfaces changed from being public to package
>> protecte at the same time: RegexQueryCapable ... so it's not clear to me
>> wether this was a concious choice to "protect" the API or not.
>>
>> Erik?
> 
> For some reason I had been thinking that interfaces were always public, 
> but I removed my ignorance (all methods are implicitly public, but the 
> interface itself is not).  I've just committed a change to make these 
> two interfaces public - no reason not to.  Interestingly, one of them 
> was already public locally which confused me a bit as well.
> 
> Anyway, all public now!
> 
> Sorry for the confusion, Mike.
> 
>     Erik
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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: Visibility of RegexCapabilities interface?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Mar 6, 2007, at 2:27 PM, Chris Hostetter wrote:
> :    PFRegexCapabilities.java:3:
> : org.apache.lucene.search.regex.RegexCapabilities is not public in
> : org.apache.lucene.search.regex; cannot be accessed from outside  
> package
>
> It looks like this *may* have been a mistake, the commit message says
> "Many javadoc additions, and adding ASL to each file" ...
>
> http://svn.apache.org/viewvc/lucene/java/trunk/contrib/regex/src/ 
> java/org/apache/lucene/search/regex/RegexCapabilities.java? 
> r1=359526&r2=381108
>
> ...but one other interfaces changed from being public to package
> protecte at the same time: RegexQueryCapable ... so it's not clear  
> to me
> wether this was a concious choice to "protect" the API or not.
>
> Erik?

For some reason I had been thinking that interfaces were always  
public, but I removed my ignorance (all methods are implicitly  
public, but the interface itself is not).  I've just committed a  
change to make these two interfaces public - no reason not to.   
Interestingly, one of them was already public locally which confused  
me a bit as well.

Anyway, all public now!

Sorry for the confusion, Mike.

	Erik




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


Re: Visibility of RegexCapabilities interface?

Posted by Chris Hostetter <ho...@fucit.org>.
:    PFRegexCapabilities.java:3:
: org.apache.lucene.search.regex.RegexCapabilities is not public in
: org.apache.lucene.search.regex; cannot be accessed from outside package

It looks like this *may* have been a mistake, the commit message says
"Many javadoc additions, and adding ASL to each file" ...

http://svn.apache.org/viewvc/lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex/RegexCapabilities.java?r1=359526&r2=381108

...but one other interfaces changed from being public to package
protecte at the same time: RegexQueryCapable ... so it's not clear to me
wether this was a concious choice to "protect" the API or not.

Erik?

: RegexCapabilities interface, the only way I can see to get this to work
: is to make this interface public.  Is that a reasonable thing to do with
: this interface?  If so, perhaps the attached patch will do the trick.

well, you could also put your RegexCapabilities instance in the lucene
package if you didn't wnat to have to recompile .. but if the change was
intentional there may be a reason why that's not a good idea either.


-Hoss


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