Hi Jörn,

Yes, it would break backward compatibility. I will take your advice and try
that. Thanks!

Jeff


On Mon, Jul 4, 2016 at 5:53 AM, Joern Kottmann <[email protected]> wrote:

> Hello,
>
> as far as I understand the proposed change will break backward
> compatibility for users who implement AdaptiveFeatureGenerator.
> Is that correct?
>
> Anyway, I always like the idea of making things simpler. In Java 8 it is
> possible to declare default methods in an interface.
> http://docs.oracle.com/javase/tutorial/java/IandI/defaultmethods.html
>
> This can probably be done without breaking backward compatibility and then
> we will mark Feature Generator Adapter as deprecated so it can be removed
> one day.
>
> Would be nice if you could open an issue for it.
>
> Jörn
>
> On Mon, Jun 27, 2016 at 11:57 PM, Jeffrey Zemerick <[email protected]>
> wrote:
>
> > Hi all,
> >
> > Under the package opennlp.tools.util.featuregen there is an
> > interface AdaptiveFeatureGenerator and an abstract
> > class FeatureGeneratorAdapter. The interface defines
> > the createFeatures(), updateAdaptiveData(), and clearAdaptiveData()
> > methods. The abstract class implements this interface to provide default
> > implementations of the updateAdaptiveData() and clearAdaptiveData()
> > functions. Feature generators then either implement the interface or
> extend
> > the abstract class.
> >
> > I created a patch to refactor these classes to remove the interface and
> use
> > the abstract class. (My motivation was I kept getting
> > AdaptiveFeatureGenerator and FeatureGeneratorAdapter confused due to
> their
> > similar naming and the inconsistency of feature generators either
> > implementing or extending.) The project does build and test with the
> patch
> > applied.
> >
> > If you think this is a worthwhile change I'll submit it on JIRA. If not,
> no
> > problem and I'll work on not being confused. (Or if there's a reason for
> > both the interface and the abstract class that I'm not aware of please
> let
> > me know!)
> >
> > Thanks,
> > Jeff
> >
>

Reply via email to