You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2025/08/05 22:00:38 UTC

[beanutils] ConstructorUtils is unused

Hi All,

In both branch 1.X and master, the class ConstructorUtils is unused
and duplicates APIs in Commons Lang.

I propose to drop it from master, which will be 2.0 when finalized.

Gary

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


Re: [beanutils] ConstructorUtils is unused

Posted by Gary Gregory <ga...@gmail.com>.
On Fri, Aug 8, 2025 at 5:07 PM Rob Tompkins <ch...@gmail.com> wrote:
>
>
>
> > On Aug 7, 2025, at 5:58 PM, Gary Gregory <ga...@gmail.com> wrote:
> >
> > On Wed, Aug 6, 2025 at 3:46 AM Piotr P. Karwasz
> > <pi...@mailing.copernik.eu> wrote:
> >>
> >>
> >> Hi Gary,
> >>
> >> On 6.08.2025 00:00, Gary Gregory wrote:
> >>> In both branch 1.X and master, the class ConstructorUtils is unused
> >>> and duplicates APIs in Commons Lang.
> >>>
> >>> I propose to drop it from master, which will be 2.0 when finalized.
> >>
> >> What should be the demarcation between Commons Text, Commons Lang, and
> >> Commons BeanUtils:
> >>
> >> - Operations on Java primitive values, arrays, and locale-independent
> >>  strings used in configurations or business logic clearly belong in
> >>  Lang.
> >>
> >> - Handling of text for UI display belongs in Text.
> >>
> >> - String interpolation also falls under Text.
> >>
> >> - Everything that deals with `java.beans` should be in BeanUtils.
> >>
> >> - I’m less certain about reflection logic: BeanUtils feels like
> >>  the natural home, although Lang currently also contains duplicates of
> >>  it.
> >>  I looked at the history and classes like `MethodUtils` appeared in
> >>  BeanUtils two years before they were moved to Lang (2008 vs 2010).
> >
> > Hi Piotr,
> >
> > Thank you for your digging in the history.
> >
> >> in
> >>  BeanUtils two years before they were moved to Lang (2008 vs 2010).
> >
> > That tells me we can complete this move for BU 2.0. Since all
> > reflection business happens in `java.lang.reflect` and Lang rightly
> > has much more comprehensive support for `java.lang.reflect`, that's
> > where the code belongs IMO. This can leave BU to _focus_ on the
> > `java.beans` aspects.
> >
> > The fact that `ConstructorUtils` is not even used by BU itself is also
> > an indication that users who want this functionality can get it from
> > Lang.
>
> +1 for deprecation. Particularly if duplicated in Lang.

I agree; I'll make sure to deprecate it in 1.x and remove it from git
master for 2.0.

Gary

>
> >
> > TY,
> > Gary
> >
> >>
> >> Piotr
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

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


Re: [beanutils] ConstructorUtils is unused

Posted by Rob Tompkins <ch...@gmail.com>.

> On Aug 7, 2025, at 5:58 PM, Gary Gregory <ga...@gmail.com> wrote:
> 
> On Wed, Aug 6, 2025 at 3:46 AM Piotr P. Karwasz
> <pi...@mailing.copernik.eu> wrote:
>> 
>> 
>> Hi Gary,
>> 
>> On 6.08.2025 00:00, Gary Gregory wrote:
>>> In both branch 1.X and master, the class ConstructorUtils is unused
>>> and duplicates APIs in Commons Lang.
>>> 
>>> I propose to drop it from master, which will be 2.0 when finalized.
>> 
>> What should be the demarcation between Commons Text, Commons Lang, and
>> Commons BeanUtils:
>> 
>> - Operations on Java primitive values, arrays, and locale-independent
>>  strings used in configurations or business logic clearly belong in
>>  Lang.
>> 
>> - Handling of text for UI display belongs in Text.
>> 
>> - String interpolation also falls under Text.
>> 
>> - Everything that deals with `java.beans` should be in BeanUtils.
>> 
>> - I’m less certain about reflection logic: BeanUtils feels like
>>  the natural home, although Lang currently also contains duplicates of
>>  it.
>>  I looked at the history and classes like `MethodUtils` appeared in
>>  BeanUtils two years before they were moved to Lang (2008 vs 2010).
> 
> Hi Piotr,
> 
> Thank you for your digging in the history.
> 
>> in
>>  BeanUtils two years before they were moved to Lang (2008 vs 2010).
> 
> That tells me we can complete this move for BU 2.0. Since all
> reflection business happens in `java.lang.reflect` and Lang rightly
> has much more comprehensive support for `java.lang.reflect`, that's
> where the code belongs IMO. This can leave BU to _focus_ on the
> `java.beans` aspects.
> 
> The fact that `ConstructorUtils` is not even used by BU itself is also
> an indication that users who want this functionality can get it from
> Lang.

+1 for deprecation. Particularly if duplicated in Lang.

> 
> TY,
> Gary
> 
>> 
>> Piotr
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


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


Re: [beanutils] ConstructorUtils is unused

Posted by Gary Gregory <ga...@gmail.com>.
On Wed, Aug 6, 2025 at 3:46 AM Piotr P. Karwasz
<pi...@mailing.copernik.eu> wrote:
>
>
> Hi Gary,
>
> On 6.08.2025 00:00, Gary Gregory wrote:
> > In both branch 1.X and master, the class ConstructorUtils is unused
> > and duplicates APIs in Commons Lang.
> >
> > I propose to drop it from master, which will be 2.0 when finalized.
>
> What should be the demarcation between Commons Text, Commons Lang, and
> Commons BeanUtils:
>
> - Operations on Java primitive values, arrays, and locale-independent
>   strings used in configurations or business logic clearly belong in
>   Lang.
>
> - Handling of text for UI display belongs in Text.
>
> - String interpolation also falls under Text.
>
> - Everything that deals with `java.beans` should be in BeanUtils.
>
> - I’m less certain about reflection logic: BeanUtils feels like
>   the natural home, although Lang currently also contains duplicates of
>   it.
>   I looked at the history and classes like `MethodUtils` appeared in
>   BeanUtils two years before they were moved to Lang (2008 vs 2010).

Hi Piotr,

Thank you for your digging in the history.

> in
>   BeanUtils two years before they were moved to Lang (2008 vs 2010).

That tells me we can complete this move for BU 2.0. Since all
reflection business happens in `java.lang.reflect` and Lang rightly
has much more comprehensive support for `java.lang.reflect`, that's
where the code belongs IMO. This can leave BU to _focus_ on the
`java.beans` aspects.

The fact that `ConstructorUtils` is not even used by BU itself is also
an indication that users who want this functionality can get it from
Lang.

TY,
Gary

>
> Piotr
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

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


Re: [beanutils] ConstructorUtils is unused

Posted by Niall Pemberton <ni...@gmail.com>.
On Wed, 6 Aug 2025 at 08:46, Piotr P. Karwasz <pi...@mailing.copernik.eu>
wrote:

>
> Hi Gary,
>
> On 6.08.2025 00:00, Gary Gregory wrote:
> > In both branch 1.X and master, the class ConstructorUtils is unused
> > and duplicates APIs in Commons Lang.
> >
> > I propose to drop it from master, which will be 2.0 when finalized.
>
> What should be the demarcation between Commons Text, Commons Lang, and
> Commons BeanUtils:
>
> - Operations on Java primitive values, arrays, and locale-independent
>   strings used in configurations or business logic clearly belong in
>   Lang.
>
> - Handling of text for UI display belongs in Text.
>
> - String interpolation also falls under Text.
>
> - Everything that deals with `java.beans` should be in BeanUtils.
>
> - I’m less certain about reflection logic: BeanUtils feels like
>   the natural home, although Lang currently also contains duplicates of
>   it.
>   I looked at the history and classes like `MethodUtils` appeared in
>   BeanUtils two years before they were moved to Lang (2008 vs 2010).


MethodUtils was added to BeanUtils in 2001

https://lists.apache.org/thread/jrb99d08v8zdh99gxv214pfqgobvg7y0

Niall



>
> Piotr
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [beanutils] ConstructorUtils is unused

Posted by "Piotr P. Karwasz" <pi...@mailing.copernik.eu>.
Hi Gary,

On 6.08.2025 00:00, Gary Gregory wrote:
> In both branch 1.X and master, the class ConstructorUtils is unused
> and duplicates APIs in Commons Lang.
> 
> I propose to drop it from master, which will be 2.0 when finalized.

What should be the demarcation between Commons Text, Commons Lang, and
Commons BeanUtils:

- Operations on Java primitive values, arrays, and locale-independent
  strings used in configurations or business logic clearly belong in
  Lang.

- Handling of text for UI display belongs in Text.

- String interpolation also falls under Text.

- Everything that deals with `java.beans` should be in BeanUtils.

- I’m less certain about reflection logic: BeanUtils feels like
  the natural home, although Lang currently also contains duplicates of
  it.
  I looked at the history and classes like `MethodUtils` appeared in
  BeanUtils two years before they were moved to Lang (2008 vs 2010).

Piotr

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