You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Bruno P. Kinoshita" <ki...@apache.org> on 2019/08/24 23:51:47 UTC

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

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

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

Posted by James Carman <ja...@carmanconsulting.com>.
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 <ki...@apache.org> 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 <se...@gmail.com>
> wrote:
>
>  On Sun, 25 Aug 2019 at 00:57, Bruno P. Kinoshita
> <br...@yahoo.com.br.invalid> 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 <
> kinow@apache.org> 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
> >

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

Posted by "Bruno P. Kinoshita" <ki...@apache.org>.
 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 <se...@gmail.com> wrote:  
 
 On Sun, 25 Aug 2019 at 00:57, Bruno P. Kinoshita
<br...@yahoo.com.br.invalid> 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 <ki...@apache.org> 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
>  

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

Posted by sebb <se...@gmail.com>.
On Sun, 25 Aug 2019 at 00:57, Bruno P. Kinoshita
<br...@yahoo.com.br.invalid> 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 <ki...@apache.org> 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: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


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

Posted by "Bruno P. Kinoshita" <br...@yahoo.com.br.INVALID>.
 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 <ki...@apache.org> 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