Le 29/10/2024 à 11:55, Gary Gregory a écrit :
In addition, this change prevents the JVM from inlining
the code in some cases, see [1].
Interesting point, thank you for mentioning it. According to [1] method
inlining applies to static, final or private methods. The article has an
example with
Le 29/10/2024 à 11:04, Dávid Szigecsán a écrit :
It is true, that static methods can't be overridden in a subclass, however
they can be hidden. So final keyword prevents method hiding.
That's correct. However StringEscapeUtils is an utils class with only
static methods and is not meant to be
On Tue, Oct 29, 2024 at 3:30 AM Emmanuel Bourg wrote:
> Hi Gary,
>
> Le 28/10/2024 à 23:02, Gary Gregory a écrit :
>
> > Would you please explain why you need this change?
> >
> > TY,
> > Gary
>
> static methods are not inherited and can't be overridden in a subclass.
> The 'final' modifier on a
Hi,
It is true, that static methods can't be overridden in a subclass, however
they can be hidden. So final keyword prevents method hiding.
It also helps make the code explicit.
Finally, the final keyword can slightly improve performance because the JVM
should not check if the method is hidden or
Hi Gary,
Le 28/10/2024 à 23:02, Gary Gregory a écrit :
Would you please explain why you need this change?
TY,
Gary
static methods are not inherited and can't be overridden in a subclass.
The 'final' modifier on a static method has no effect and can be removed.
Emmanuel Bourg
---
Hello,
Would you please explain why you need this change?
TY,
Gary
On Sat, Oct 26, 2024 at 5:12 AM wrote:
> This is an automated email from the ASF dual-hosted git repository.
>
> ebourg pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/commons-text.git
>
> c