[LANG-1478] Do we need to wait for a major release for this one?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[LANG-1478] Do we need to wait for a major release for this one?

Bruno P. Kinoshita-2
Hi,
In LANG-1478, a contributor provided a PR for ClassUtils.getAbbreviatedName.
If you have a class name with 10 characters (e.g. "ab.de.Ghij"), and calls the method getAbbreviatedName passing the length argument of 10, you get a 9 characters long string back "a.de.Ghij".
The Javadoc for the length parameter  states:

"len  the desired length of the abbreviated name"

In my opinion it confirms the bug. I have tested the code from the GitHub PR p1[ and it solves the bug, but given that it will be a backward incompatible change (not binary, but behavior), I wonder if it needs a major release then? (i.e. 4.x instead of 3.10).
CheersBruno
[1] https://github.com/apache/commons-lang/pull/446
Reply | Threaded
Open this post in threaded view
|

Re: [LANG-1478] Do we need to wait for a major release for this one?

Bruno P. Kinoshita-3
 Sorry, wrong PR [1] link: https://github.com/apache/commons-lang/pull/445/
    On Sunday, 25 August 2019, 11:51:47 am NZST, Bruno P. Kinoshita <[hidden email]> wrote:  
 
 Hi,
In LANG-1478, a contributor provided a PR for ClassUtils.getAbbreviatedName.
If you have a class name with 10 characters (e.g. "ab.de.Ghij"), and calls the method getAbbreviatedName passing the length argument of 10, you get a 9 characters long string back "a.de.Ghij".
The Javadoc for the length parameter  states:

"len  the desired length of the abbreviated name"

In my opinion it confirms the bug. I have tested the code from the GitHub PR p1[ and it solves the bug, but given that it will be a backward incompatible change (not binary, but behavior), I wonder if it needs a major release then? (i.e. 4.x instead of 3.10).
CheersBruno
[1] https://github.com/apache/commons-lang/pull/446
 
Reply | Threaded
Open this post in threaded view
|

Re: [LANG-1478] Do we need to wait for a major release for this one?

sebb-2-2
On Sun, 25 Aug 2019 at 00:57, Bruno P. Kinoshita
<[hidden email]> wrote:

>
>  Sorry, wrong PR [1] link: https://github.com/apache/commons-lang/pull/445/
>     On Sunday, 25 August 2019, 11:51:47 am NZST, Bruno P. Kinoshita <[hidden email]> wrote:
>
>  Hi,
> In LANG-1478, a contributor provided a PR for ClassUtils.getAbbreviatedName.
> If you have a class name with 10 characters (e.g. "ab.de.Ghij"), and calls the method getAbbreviatedName passing the length argument of 10, you get a 9 characters long string back "a.de.Ghij".
> The Javadoc for the length parameter  states:
>
> "len  the desired length of the abbreviated name"
>
> In my opinion it confirms the bug. I have tested the code from the GitHub PR p1[ and it solves the bug, but given that it will be a backward incompatible change (not binary, but behavior), I wonder if it needs a major release then? (i.e. 4.x instead of 3.10).

I don't see why it would need a major release.

Fixing any code bug by definition changes behaviour.
Given that the Javadoc is unambiguous it's clear what the behaviour
should be, so it's extremely unlikely that anyone is relying on the
broken behaviour.

> CheersBruno
> [1] https://github.com/apache/commons-lang/pull/446
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [LANG-1478] Do we need to wait for a major release for this one?

Bruno P. Kinoshita-2
 I think it makes sense, good to go with 3.x then. Thanks sebb!

    On Sunday, 25 August 2019, 1:35:41 pm NZST, sebb <[hidden email]> wrote:  
 
 On Sun, 25 Aug 2019 at 00:57, Bruno P. Kinoshita
<[hidden email]> wrote:

>
>  Sorry, wrong PR [1] link: https://github.com/apache/commons-lang/pull/445/
>    On Sunday, 25 August 2019, 11:51:47 am NZST, Bruno P. Kinoshita <[hidden email]> wrote:
>
>  Hi,
> In LANG-1478, a contributor provided a PR for ClassUtils.getAbbreviatedName.
> If you have a class name with 10 characters (e.g. "ab.de.Ghij"), and calls the method getAbbreviatedName passing the length argument of 10, you get a 9 characters long string back "a.de.Ghij".
> The Javadoc for the length parameter  states:
>
> "len  the desired length of the abbreviated name"
>
> In my opinion it confirms the bug. I have tested the code from the GitHub PR p1[ and it solves the bug, but given that it will be a backward incompatible change (not binary, but behavior), I wonder if it needs a major release then? (i.e. 4.x instead of 3.10).

I don't see why it would need a major release.

Fixing any code bug by definition changes behaviour.
Given that the Javadoc is unambiguous it's clear what the behaviour
should be, so it's extremely unlikely that anyone is relying on the
broken behaviour.

> CheersBruno
> [1] https://github.com/apache/commons-lang/pull/446
>  
Reply | Threaded
Open this post in threaded view
|

Re: [LANG-1478] Do we need to wait for a major release for this one?

James Carman
In fact, you don’t even need to change the minor version (assuming this is
the only thing being done). You can just do a “point release”, changing
only the third digit, or 3.9.1

On Sat, Aug 24, 2019 at 9:43 PM Bruno P. Kinoshita <[hidden email]> wrote:

>  I think it makes sense, good to go with 3.x then. Thanks sebb!
>
>     On Sunday, 25 August 2019, 1:35:41 pm NZST, sebb <[hidden email]>
> wrote:
>
>  On Sun, 25 Aug 2019 at 00:57, Bruno P. Kinoshita
> <[hidden email]> wrote:
> >
> >  Sorry, wrong PR [1] link:
> https://github.com/apache/commons-lang/pull/445/
> >    On Sunday, 25 August 2019, 11:51:47 am NZST, Bruno P. Kinoshita <
> [hidden email]> wrote:
> >
> >  Hi,
> > In LANG-1478, a contributor provided a PR for
> ClassUtils.getAbbreviatedName.
> > If you have a class name with 10 characters (e.g. "ab.de.Ghij"), and
> calls the method getAbbreviatedName passing the length argument of 10, you
> get a 9 characters long string back "a.de.Ghij".
> > The Javadoc for the length parameter  states:
> >
> > "len  the desired length of the abbreviated name"
> >
> > In my opinion it confirms the bug. I have tested the code from the
> GitHub PR p1[ and it solves the bug, but given that it will be a backward
> incompatible change (not binary, but behavior), I wonder if it needs a
> major release then? (i.e. 4.x instead of 3.10).
>
> I don't see why it would need a major release.
>
> Fixing any code bug by definition changes behaviour.
> Given that the Javadoc is unambiguous it's clear what the behaviour
> should be, so it's extremely unlikely that anyone is relying on the
> broken behaviour.
>
> > CheersBruno
> > [1] https://github.com/apache/commons-lang/pull/446
> >