You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Shai Erera <se...@gmail.com> on 2007/12/26 07:28:55 UTC

Making Tokenizer.reset(Reader) public

Hi

In order to implement reusableTokenStream and be able to reset a Tokenizer,
Tokenizer defines a reset(Reader) method. The problem is that this method is
protected. I need to call this reset(Reader) method without having to know
in advance what will be the type of the Tokenizer (I plan to have several).
I noticed that almost all Tokenizer extensions define this method as public,
and I wonder if this can be changed for Tokenizer also (I can't simply
create my general Tokenizer extension and inherit from it because I want to
use StandardTokenizer as well).

Should I open a JIRA issue? (although the change is very basic)

Shai Erera

Re: Making Tokenizer.reset(Reader) public

Posted by Shai Erera <se...@gmail.com>.
Done

On Dec 26, 2007 9:09 AM, Doron Cohen <cd...@gmail.com> wrote:

> Shai can you open a JIRA issue for this (no need
> for a patch).
>
> I know it may seem a lot of effort for just a single word
> change, but this is also a good place for further discussion
> on this, i.e. in case someone would reject the API change
> and would like to suggest to revert it before next release.
>
> Thanks, Doron
>
> On Dec 26, 2007 8:51 AM, Doron Cohen <cd...@gmail.com> wrote:
>
> > Yes you're right, it should be public or else you'd
> > have to put your new classes in the same package.
> >
> >
> > On Dec 26, 2007 8:28 AM, Shai Erera <serera@gmail.com > wrote:
> >
> > > Hi
> > >
> > > In order to implement reusableTokenStream and be able to reset a
> > > Tokenizer,
> > > Tokenizer defines a reset(Reader) method. The problem is that this
> > > method is
> > > protected. I need to call this reset(Reader) method without having to
> > > know
> > > in advance what will be the type of the Tokenizer (I plan to have
> > > several).
> > > I noticed that almost all Tokenizer extensions define this method as
> > > public,
> > > and I wonder if this can be changed for Tokenizer also (I can't simply
> > > create my general Tokenizer extension and inherit from it because I
> want
> > > to
> > > use StandardTokenizer as well).
> > >
> > > Should I open a JIRA issue? (although the change is very basic)
> > >
> > > Shai Erera
> > >
> >
> >
>



-- 
Regards,

Shai Erera

Re: Making Tokenizer.reset(Reader) public

Posted by Doron Cohen <cd...@gmail.com>.
Shai can you open a JIRA issue for this (no need
for a patch).

I know it may seem a lot of effort for just a single word
change, but this is also a good place for further discussion
on this, i.e. in case someone would reject the API change
and would like to suggest to revert it before next release.

Thanks, Doron

On Dec 26, 2007 8:51 AM, Doron Cohen <cd...@gmail.com> wrote:

> Yes you're right, it should be public or else you'd
> have to put your new classes in the same package.
>
>
> On Dec 26, 2007 8:28 AM, Shai Erera <serera@gmail.com > wrote:
>
> > Hi
> >
> > In order to implement reusableTokenStream and be able to reset a
> > Tokenizer,
> > Tokenizer defines a reset(Reader) method. The problem is that this
> > method is
> > protected. I need to call this reset(Reader) method without having to
> > know
> > in advance what will be the type of the Tokenizer (I plan to have
> > several).
> > I noticed that almost all Tokenizer extensions define this method as
> > public,
> > and I wonder if this can be changed for Tokenizer also (I can't simply
> > create my general Tokenizer extension and inherit from it because I want
> > to
> > use StandardTokenizer as well).
> >
> > Should I open a JIRA issue? (although the change is very basic)
> >
> > Shai Erera
> >
>
>

Re: Making Tokenizer.reset(Reader) public

Posted by Doron Cohen <cd...@gmail.com>.
Yes you're right, it should be public or else you'd
have to put your new classes in the same package.

On Dec 26, 2007 8:28 AM, Shai Erera <se...@gmail.com> wrote:

> Hi
>
> In order to implement reusableTokenStream and be able to reset a
> Tokenizer,
> Tokenizer defines a reset(Reader) method. The problem is that this method
> is
> protected. I need to call this reset(Reader) method without having to know
> in advance what will be the type of the Tokenizer (I plan to have
> several).
> I noticed that almost all Tokenizer extensions define this method as
> public,
> and I wonder if this can be changed for Tokenizer also (I can't simply
> create my general Tokenizer extension and inherit from it because I want
> to
> use StandardTokenizer as well).
>
> Should I open a JIRA issue? (although the change is very basic)
>
> Shai Erera
>