Re: (commons-text) 01/04: Removed the final modifier from the static methods

2024-10-29 Thread Emmanuel Bourg
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

Re: (commons-text) 01/04: Removed the final modifier from the static methods

2024-10-29 Thread Emmanuel Bourg
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

Re: (commons-text) 01/04: Removed the final modifier from the static methods

2024-10-29 Thread Gary Gregory
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

Re: (commons-text) 01/04: Removed the final modifier from the static methods

2024-10-29 Thread Dávid Szigecsán
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

Re: (commons-text) 01/04: Removed the final modifier from the static methods

2024-10-29 Thread Emmanuel Bourg
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 ---

Re: (commons-text) 01/04: Removed the final modifier from the static methods

2024-10-28 Thread Gary Gregory
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