You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Claude Warren <cl...@xenei.com> on 2023/12/29 08:11:48 UTC
[BEANUTILS] Is there a good reason for Converter to not be a FunctionalInterface?
I am looking at BeanUtils as part of the CLI options to parse a command
line option string into a class.
I see that Converter is an interface with one method; converting a String
to an Object. Is there a good reason for this not to be annotated as
an @FunctionalInterface?
Claude
--
LinkedIn: http://www.linkedin.com/in/claudewarren
Re: [BEANUTILS] Is there a good reason for Converter to not be a FunctionalInterface?
Posted by Gary Gregory <ga...@gmail.com>.
In git master: Annotated Converter with @FunctionalInterface.
Gary
On Fri, Dec 29, 2023 at 3:12 AM Claude Warren <cl...@xenei.com> wrote:
>
> I am looking at BeanUtils as part of the CLI options to parse a command
> line option string into a class.
>
> I see that Converter is an interface with one method; converting a String
> to an Object. Is there a good reason for this not to be annotated as
> an @FunctionalInterface?
>
> Claude
> --
> LinkedIn: http://www.linkedin.com/in/claudewarren
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [BEANUTILS] Is there a good reason for Converter to not be a FunctionalInterface?
Posted by Paul King <pa...@gmail.com>.
The 1.9.x releases are pre-JDK 8. The project looks set up for a 2.0
release where such a change might make sense but I don't think that
has happened yet.
Cheers, Paul.
On Fri, Dec 29, 2023 at 6:12 PM Claude Warren <cl...@xenei.com> wrote:
>
> I am looking at BeanUtils as part of the CLI options to parse a command
> line option string into a class.
>
> I see that Converter is an interface with one method; converting a String
> to an Object. Is there a good reason for this not to be annotated as
> an @FunctionalInterface?
>
> Claude
> --
> LinkedIn: http://www.linkedin.com/in/claudewarren
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [BEANUTILS] Is there a good reason for Converter to not be a FunctionalInterface?
Posted by Gary Gregory <ga...@gmail.com>.
Also https://issues.apache.org/jira/browse/BEANUTILS-564
Gary
On Fri, Dec 29, 2023 at 7:02 AM Gary Gregory <ga...@gmail.com> wrote:
>
> Also:
>
> - BeanIntrospector
> - LocaleConverter
>
> Gary
>
> On Fri, Dec 29, 2023 at 6:56 AM Gary Gregory <ga...@gmail.com> wrote:
> >
> > No reason aside from the fact that the code base is not fully
> > modernized. You could also ask if Converter should extend BiFunction.
> >
> > I would like to create a release candidate for a 2.0.0-M1 release
> > soon. This would unlock a lot of other work down the line.
> >
> > One item holding us back is that BeanUtilsBean2 extends BeanUtilsBean
> > where there should only be one class.
> >
> > There are likely a few more cleanups that need to happen. I've removed
> > most of the deprecated code.
> >
> > Gary
> >
> > On Fri, Dec 29, 2023 at 3:12 AM Claude Warren <cl...@xenei.com> wrote:
> > >
> > > I am looking at BeanUtils as part of the CLI options to parse a command
> > > line option string into a class.
> > >
> > > I see that Converter is an interface with one method; converting a String
> > > to an Object. Is there a good reason for this not to be annotated as
> > > an @FunctionalInterface?
> > >
> > > Claude
> > > --
> > > LinkedIn: http://www.linkedin.com/in/claudewarren
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [BEANUTILS] Is there a good reason for Converter to not be a FunctionalInterface?
Posted by Gary Gregory <ga...@gmail.com>.
Also:
- BeanIntrospector
- LocaleConverter
Gary
On Fri, Dec 29, 2023 at 6:56 AM Gary Gregory <ga...@gmail.com> wrote:
>
> No reason aside from the fact that the code base is not fully
> modernized. You could also ask if Converter should extend BiFunction.
>
> I would like to create a release candidate for a 2.0.0-M1 release
> soon. This would unlock a lot of other work down the line.
>
> One item holding us back is that BeanUtilsBean2 extends BeanUtilsBean
> where there should only be one class.
>
> There are likely a few more cleanups that need to happen. I've removed
> most of the deprecated code.
>
> Gary
>
> On Fri, Dec 29, 2023 at 3:12 AM Claude Warren <cl...@xenei.com> wrote:
> >
> > I am looking at BeanUtils as part of the CLI options to parse a command
> > line option string into a class.
> >
> > I see that Converter is an interface with one method; converting a String
> > to an Object. Is there a good reason for this not to be annotated as
> > an @FunctionalInterface?
> >
> > Claude
> > --
> > LinkedIn: http://www.linkedin.com/in/claudewarren
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [BEANUTILS] Is there a good reason for Converter to not be a FunctionalInterface?
Posted by Gary Gregory <ga...@gmail.com>.
No reason aside from the fact that the code base is not fully
modernized. You could also ask if Converter should extend BiFunction.
I would like to create a release candidate for a 2.0.0-M1 release
soon. This would unlock a lot of other work down the line.
One item holding us back is that BeanUtilsBean2 extends BeanUtilsBean
where there should only be one class.
There are likely a few more cleanups that need to happen. I've removed
most of the deprecated code.
Gary
On Fri, Dec 29, 2023 at 3:12 AM Claude Warren <cl...@xenei.com> wrote:
>
> I am looking at BeanUtils as part of the CLI options to parse a command
> line option string into a class.
>
> I see that Converter is an interface with one method; converting a String
> to an Object. Is there a good reason for this not to be annotated as
> an @FunctionalInterface?
>
> Claude
> --
> LinkedIn: http://www.linkedin.com/in/claudewarren
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org