Re: (commons-lang) 01/02: Deprecate SystemUtils.getUserName(String) in favor of SystemProperties.getUserName(Supplier)

2024-05-02 Thread Gary D. Gregory
I meant I'll only change the Suppliers to Strings. The deprecations are fine IMO. This is how I see it: - Stock system property access is done through SystemProperties (you get Strings) - More advanced services that require conversions like getting a Stream of Paths for a java.class.path is

Re: (commons-lang) 01/02: Deprecate SystemUtils.getUserName(String) in favor of SystemProperties.getUserName(Supplier)

2024-05-02 Thread Gary D. Gregory
Hello Elliotte, OK, I'll use String defaults instead of Suppliers. Gary On 2024/05/02 16:48:48 Elliotte Rusty Harold wrote: > I'm OK with preferring SystemProperties though I'm not sure that > alpine justifies a new method and deprecation. > > I second the opinion that a literal string is

Re: (commons-lang) 01/02: Deprecate SystemUtils.getUserName(String) in favor of SystemProperties.getUserName(Supplier)

2024-05-02 Thread Gary D. Gregory
Hi Bernd, Sounds reasonable. I'll revert the deprecation and use String defaults instead of Suppliers. Gary On 2024/05/01 17:56:34 Bernd Eckenfels wrote: > Hi Gregory, > > What’s the idea behind that deprecation? The implementation is robust and > simple and easy to use. I would guess most

Re: (commons-lang) 01/02: Deprecate SystemUtils.getUserName(String) in favor of SystemProperties.getUserName(Supplier)

2024-05-02 Thread Elliotte Rusty Harold
I'm OK with preferring SystemProperties though I'm not sure that alpine justifies a new method and deprecation. I second the opinion that a literal string is strongly preferable to a Supplier here. Pick the simplest thing that could possibly work. As Knuth warned us, premature optimization is the

Re: (commons-lang) 01/02: Deprecate SystemUtils.getUserName(String) in favor of SystemProperties.getUserName(Supplier)

2024-05-01 Thread Gary Gregory
It feels like the supplier version is much better to avoid the use case of building the string in place. I would also like to centralize all things related directly to sys props in the SysProp class. This way, you know to look in one place instead of sometimes here and sometimes there. Do you

Re: (commons-lang) 01/02: Deprecate SystemUtils.getUserName(String) in favor of SystemProperties.getUserName(Supplier)

2024-05-01 Thread Bernd Eckenfels
Hi Gregory, What’s the idea behind that deprecation? The implementation is robust and simple and easy to use. I would guess most user rather want to specify a literal fallback than a supplier. Gruss Bernd ggreg...@apache.org wrote on 1. May 2024 16:07 (GMT +02:00): > This is an automated

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-08 Thread Mark Struberg
3/builder/EqualsBuilder.java >>>>>> @@ -978,6 +978,16 @@ public EqualsBuilder reflectionAppend(final >> Object lhs, final Object rhs) { >>>>>> if (bypassReflectionClasses != null >>>>>> && (bypassReflectionClasses.contain

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-08 Thread Gary Gregory
t;>>>&& (bypassReflectionClasses.contains(lhsClass) || > bypassReflectionClasses.contains(rhsClass))) { > >>>>isEquals = lhs.equals(rhs); > >>>> +} else if (testClass.isAssignableFrom(List.class)) {

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-08 Thread Mark Struberg
&& (bypassReflectionClasses.contains(lhsClass) || >> bypassReflectionClasses.contains(rhsClass))) { >>>>> isEquals = lhs.equals(rhs); >>>>> +} else if (testClass.isAssignableFrom(List.class)) { >>>>>

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-08 Thread Mark Struberg
ass) || >>>> bypassReflectionClasses.contains(rhsClass))) { >>>>isEquals = lhs.equals(rhs); >>>> +} else if (testClass.isAssignableFrom(List.class)) { >>>> +List lList = (List) lhs; >>>> +

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-07 Thread Daniel Watson
t; >> +if (lList.size() != rList.size()) { > > >> +isEquals = false; > > >> +return this; > > >> +} > > >> +for (int i = 0; i < lList.size(); i++) { > >

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-07 Thread Gary D. Gregory
> >> +} > >> +for (int i = 0; i < lList.size(); i++) { > >> +reflectionAppend(lList.get(i), rList.get(i)); > >> +} > >> } else { > >> > >> I'm rather sure th

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-07 Thread sebb
;> +if (lList.size() != rList.size()) { > >> +isEquals = false; > >> +return this; > >> +} > >> +for (int i = 0; i < lList.size(); i++) { > >> +

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-06 Thread Mark Struberg
nt i = 0; i < lList.size(); i++) { >> +reflectionAppend(lList.get(i), rList.get(i)); >> +} >> } else { >> >> I'm rather sure this is still not enough and there are plenty other cases to >> consider. Like e.g. handling Maps etc

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-06 Thread Gary Gregory
e { > > I'm rather sure this is still not enough and there are plenty other cases to > consider. Like e.g. handling Maps etc. > But at least that's the direction I try to approach it right now. And of > course this new part should potentially also be enabled by a flag... > > Will

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-06 Thread Mark Struberg
Grue, strub [1] https://issues.apache.org/jira/browse/LANG-1711 > Am 06.03.2024 um 13:18 schrieb Gary Gregory : > > This sounds like a good idea to try. I would call the option something else > though. We would not skip calling equals if it is defined right? How about > "

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-06 Thread Gary Gregory
This sounds like a good idea to try. I would call the option something else though. We would not skip calling equals if it is defined right? How about "useEqualsIfPresent". Gary On Wed, Mar 6, 2024, 5:03 AM Mark Struberg wrote: > Hi! > > I have a question about EqualsBuilder#reflectionEquals.

[LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-06 Thread Mark Struberg
Hi! I have a question about EqualsBuilder#reflectionEquals. From Java9 onwards we get more and more nasty module problems. Mainly because the code tries to recurse into java.util.* classes as well. I know that I can use setBypassReflectionClasses for those. But wouldn't it be fine to have an

Re: java.desktop dependency in commons-lang

2024-03-05 Thread Gary Gregory
ar how to navigate the mailing lists. > > There is a dependency on the java.desktop module - i.e. Swing - in > commons-lang. It lives in AbstractCircuitBreaker here. > > > https://github.com/apache/commons-lang/blob/master/src/main/java/org/apache/commons/lang3/concurrent/AbstractCircuit

java.desktop dependency in commons-lang

2024-03-05 Thread Ethan McCue
Apologies if this has already been brought to your attention - i'm still a bit unclear how to navigate the mailing lists. There is a dependency on the java.desktop module - i.e. Swing - in commons-lang. It lives in AbstractCircuitBreaker here. https://github.com/apache/commons-lang/blob/master

Re: Apache Common Lang -- How do I compile or did I find a bug

2023-12-12 Thread Charles Stockman
; the > > > > title > > > >approximating the text "Maven and Java Version needed" > > > > > > > > I have selected a Jira Issue that I would enjoy working on. The > steps > > > > should be to create a Jira Account and then

Re: Apache Common Lang -- How do I compile or did I find a bug

2023-12-12 Thread Gary Gregory
t; > should be to create a Jira Account and then do I assign myself to the > > issue > > > or is there some process. > > > > > > Thanks for your help > > > Charles Stockman. > > > > > > > > > > > > > > > >

Re: Apache Common Lang -- How do I compile or did I find a bug

2023-12-12 Thread Charles Stockman
; > Thanks for your help > > Charles Stockman. > > > > > > > > > > > > On Tue, Dec 12, 2023 at 11:00 AM sebb wrote: > > > > > On Tue, 12 Dec 2023 at 14:21, Alex Herbert > > > wrote: > > > > > > > > On Tu

Re: Apache Common Lang -- How do I compile or did I find a bug

2023-12-12 Thread Gary Gregory
sebb wrote: > > > On Tue, 12 Dec 2023 at 14:21, Alex Herbert > > wrote: > > > > > > On Tue, 12 Dec 2023 at 13:20, Gary Gregory > > wrote: > > > > > > > > What's the best way to document this do you think? > > > > > >

Re: Apache Common Lang -- How do I compile or did I find a bug

2023-12-12 Thread Charles Stockman
What's the best way to document this do you think? > > > > That lang is tested (and so should be built) with the latest JDK of > > the respective stable release (8, 11, 17, 21)? > > > > This could live on the README in the GH repo. This would require an > > update to the comm

Re: Apache Common Lang -- How do I compile or did I find a bug

2023-12-12 Thread sebb
On Tue, 12 Dec 2023 at 14:21, Alex Herbert wrote: > > On Tue, 12 Dec 2023 at 13:20, Gary Gregory wrote: > > > > What's the best way to document this do you think? > > That lang is tested (and so should be built) with the latest JDK of > the respective st

Re: Apache Common Lang -- How do I compile or did I find a bug

2023-12-12 Thread Alex Herbert
On Tue, 12 Dec 2023 at 13:20, Gary Gregory wrote: > > What's the best way to document this do you think? That lang is tested (and so should be built) with the latest JDK of the respective stable release (8, 11, 17, 21)? This could live on the README in the GH repo. This would require an

Re: Apache Common Lang -- How do I compile or did I find a bug

2023-12-12 Thread Gary Gregory
What's the best way to document this do you think? Gary On Tue, Dec 12, 2023, 7:19 AM Alex Herbert wrote: > I updated JDK 17.0.6 to 17.0.9 and lang now builds on my mac: > > Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9) > Java version: 17.0.9, vendor: Eclipse Adopt

Re: Apache Common Lang -- How do I compile or did I find a bug

2023-12-12 Thread Alex Herbert
I updated JDK 17.0.6 to 17.0.9 and lang now builds on my mac: Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9) Java version: 17.0.9, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home Default locale: en_GB, platform encoding: UTF-8 OS

Re: Apache Common Lang -- How do I compile or did I find a bug

2023-12-12 Thread Gary Gregory
"unix" > > The GH actions builds are green for MacOS latest on all JDKs. I see > you are using a similar OS version to my mac. So this may be a MacOS > Sonoma 14 vs MacOS Ventura 13 issue. It would be good if someone else > can replicate it on MacOS. > > Alex

Re: Apache Common Lang -- How do I compile or did I find a bug

2023-12-12 Thread Alex Herbert
can replicate it on MacOS. Alex On Tue, 12 Dec 2023 at 08:52, Charles Stockman wrote: > > Hello and thanks for your help. > > > How do I compile or did I find a bug ? > > > I have been been attempting to build the latest version of Apache > > Common-Lang. > >

Apache Common Lang -- How do I compile or did I find a bug

2023-12-12 Thread Charles Stockman
Hello and thanks for your help. How do I compile or did I find a bug ? I have been been attempting to build the latest version of Apache  Common-Lang. The GitHub repository that I have used is  https://github.com/apache/commons-lang.git I have the billed instructions mentioned in the following

[ANNOUNCE] Apache Commons Lang Version 3.14.0

2023-11-27 Thread Gary Gregory
The Apache Commons team is pleased to announce Apache Commons Lang Version 3.14.0. Commons Lang is a set of utility functions and reusable components that should be of use in any Java environment. Starting with Commons Lang 3.9, we target Java 8, making use of those features. For advice

Re: [LANG] Bad download links in the Download web page (3.13.0)

2023-11-27 Thread Gary Gregory
TY Cpm: Fixed! Yes, this is the right place :-) Gary On Sun, Nov 26, 2023 at 9:38 PM Christian P. MOMON wrote: > > > Hi, > > In the web page "Download Apache Commons Lang" > (https://commons.apache.org/proper/commons-lang/download_lang.cgi), in > the sect

[LANG] Bad download links in the Download web page (3.13.0)

2023-11-26 Thread Christian P. MOMON
Hi, In the web page "Download Apache Commons Lang" (https://commons.apache.org/proper/commons-lang/download_lang.cgi), in the section "Apache Commons Lang 3.13.0", the four download links give "404 Not Found error": - commons-lang3-3.13.0-bin.tar.gz

[RESULT][VOTE] Release Apache Commons Lang 3.14.0 based on RC1

2023-11-21 Thread Gary Gregory
, 2023, at 10:15 AM, Gary Gregory wrote: > > > > > > We have fixed a few bugs and added some enhancements since Apache > > > Commons Lang 3.13.0 was released, so I would like to release Apache > > > Commons Lang 3.14.0. > > > > > > Apache Comm

Re: [VOTE] Release Apache Commons Lang 3.14.0 based on RC1

2023-11-21 Thread Gary Gregory
e good work!!! > > > On Nov 18, 2023, at 10:15 AM, Gary Gregory wrote: > > > > We have fixed a few bugs and added some enhancements since Apache > > Commons Lang 3.13.0 was released, so I would like to release Apache > > Commons Lang 3.14.0. > > > >

Re: [VOTE] Release Apache Commons Lang 3.14.0 based on RC1

2023-11-19 Thread Rob Tompkins
dded some enhancements since Apache > Commons Lang 3.13.0 was released, so I would like to release Apache > Commons Lang 3.14.0. > > Apache Commons Lang 3.14.0 RC1 is available for review here: >https://dist.apache.org/repos/dist/dev/commons/lang/3.14.0-RC1 > (svn revision 65412) &g

Re: [VOTE] Release Apache Commons Lang 3.14.0 based on RC1

2023-11-18 Thread Bruno Kinoshita
gs and added some enhancements since Apache > Commons Lang 3.13.0 was released, so I would like to release Apache > Commons Lang 3.14.0. > > Apache Commons Lang 3.14.0 RC1 is available for review here: > https://dist.apache.org/repos/dist/dev/commons/lang/3.14.0-RC1 > (svn r

[VOTE] Release Apache Commons Lang 3.14.0 based on RC1

2023-11-18 Thread Gary Gregory
We have fixed a few bugs and added some enhancements since Apache Commons Lang 3.13.0 was released, so I would like to release Apache Commons Lang 3.14.0. Apache Commons Lang 3.14.0 RC1 is available for review here: https://dist.apache.org/repos/dist/dev/commons/lang/3.14.0-RC1 (svn revision

Re: [lang] DurationFormatUtils does not calculate duration for some specific dates and times

2023-11-06 Thread Sujan Biswas
Please ignore the email. I need to pass the TimeZone for calculation, otherwise it was taking the system default timezone which changes during DayLight Saving. Thanks, Sujan On Mon, 6 Nov 2023 at 16:35, Sujan Biswas wrote: > Hi Team, > > Please find the below test case and observation which

[lang] DurationFormatUtils does not calculate duration for some specific dates and times

2023-11-06 Thread Sujan Biswas
Hi Team, Please find the below test case and observation which seems to be a bug in the DurationFormatUtils class. If you look at the calculated duration it says "Duration : *00-1113023530*" with output format as MMddHHmmssSSS. org.apache.commons commons-lang3 3.12.0 provided @Test void

Re: [lang] RandomStringUtilsTest.testRandomStringUtilsHomog fails a lot

2023-10-20 Thread Alex Herbert
I opened a PR after changing the expected failure probability to 1e-5. I had an old version of the GH build file when I estimated it used 4 runs. The latest CI runs 4 JDKs on 3 platforms plus CodeQL and coverage. So this is 14 runs. We should see failures with a probability of: (1 - (1 -

Re: [lang] RandomStringUtilsTest.testRandomStringUtilsHomog fails a lot

2023-10-20 Thread Gary D. Gregory
Hi Alex, I'd prefer if you could give a shot at adjusting this test when you can take the time. TY, Gary On 2023/10/20 18:17:35 Alex Herbert wrote: > On Fri, 20 Oct 2023 at 18:55, Alex Herbert wrote: > > > > The chi-square critical value (13.82) is correct: > > > > >>> from scipy.stats import

Re: [lang] RandomStringUtilsTest.testRandomStringUtilsHomog fails a lot

2023-10-20 Thread Alex Herbert
On Fri, 20 Oct 2023 at 18:55, Alex Herbert wrote: > > The chi-square critical value (13.82) is correct: > > >>> from scipy.stats import chi2 > >>> chi2(2).isf(0.001) > 13.815510557964274 > > The test seems to fail with the expected frequency when run locally. I > annotated with: > >

Re: [lang] RandomStringUtilsTest.testRandomStringUtilsHomog fails a lot

2023-10-20 Thread Alex Herbert
The chi-square critical value (13.82) is correct: >>> from scipy.stats import chi2 >>> chi2(2).isf(0.001) 13.815510557964274 The test seems to fail with the expected frequency when run locally. I annotated with: @RepeatedTest(value = 10) I observe 93 failures (just under 1 in 1000). So it

Re: [lang] RandomStringUtilsTest.testRandomStringUtilsHomog fails a lot

2023-10-20 Thread Elliotte Rusty Harold
It's possible the chi square test is miscalculated. Perhaps some stats expert can check that. It's also possible the chi square test isn't the right one to use here. Again, consult a stats expert. It's also very possible that the randomness is not nearly as random as it's supposed to be. That's

[lang] RandomStringUtilsTest.testRandomStringUtilsHomog fails a lot

2023-10-20 Thread Gary D. Gregory
Despite the failure comment: RandomStringUtilsTest.testRandomStringUtilsHomog:474 test homogeneity -- will fail about 1 in 1000 times ==> expected: but was: This test fails a LOT more than once every 1000 times, based on how many GitHub builds I need to restart every week. What can be done

Re: [LANG] Extend "EqualsBuilder (Was: Pull request)

2023-10-11 Thread Marc Cappelletti
Hello all, Just a comment that my ICLA has been filled. The jira for the PR https://github.com/apache/commons-lang/pull/1114 is https://issues.apache.org/jira/browse/LANG-1712 Now heading to address the comments. Marc Le mer. 27 sept. 2023 à 12:35, Gilles Sadowski a écrit : > Hello. >

Re: [LANG] Extend "EqualsBuilder (Was: Pull request)

2023-09-27 Thread Gilles Sadowski
Hello. Le mer. 27 sept. 2023 à 11:48, Marc Cappelletti a écrit : > > Hello Gilles, > > Thanks for the details and the comment. Thanks for your interest in contributing. > > By the way, do we comment directly on the PR Many people mostly do it on GH (which shuns people who don't want to

Re: [LANG] Extend "EqualsBuilder (Was: Pull request)

2023-09-27 Thread Marc Cappelletti
ot; of the "Commons" > project, the "Subject: " line should be prefixed by the "id" of the > component > (in this case: "[LANG] Pull request"). It is also nice if the subject > line is a > bit more specific (in this case: "[LANG] Extend &

[LANG] Extend "EqualsBuilder (Was: Pull request)

2023-09-27 Thread Gilles Sadowski
Hello. As this list is shared among many (30+) "components" of the "Commons" project, the "Subject: " line should be prefixed by the "id" of the component (in this case: "[LANG] Pull request"). It is also nice if the subject line is

Re: [commons-lang] Util function in NumberUtils to count significant figures in a numeric string

2023-08-20 Thread Elliotte Rusty Harold
Are there any existing projects that have this functionality now? E.g. if there's some physics project, some ML project, and some DNA project that have all had to reinvent this particular wheel, that's both good evidence that we need it and something to inform us of what a useful API might look

[Commons-Lang] EventListenerSupport fireQuietly method

2023-08-16 Thread Daniel Watson
Does it make sense for the EventListenerSupport class to have a separate method to fire an event "quietly" i.e. without throwing exceptions to the caller? I've needed to implement it locally to guarantee that all listeners receive the event, whereas the standard fire() terminates on the first

Re: [commons-lang] Util function in NumberUtils to count significant figures in a numeric string

2023-08-11 Thread Daniel Watson
Im am currently using that API for unit conversion. Don't remember seeing anything related to uncertainty or precision. I'll double check, but IIRC it's focused very much on just unit conversion. On Thu, Aug 10, 2023, 9:40 PM Gary Gregory wrote: > See also JSR-363

Re: [commons-lang] Util function in NumberUtils to count significant figures in a numeric string

2023-08-10 Thread Gary Gregory
See also JSR-363 https://jcp.org/en/jsr/detail?id=363 Gary On Thu, Aug 10, 2023, 10:56 AM Daniel Watson wrote: > I brought this up in commons-math and it was determined that that probably > wasn't a good place for it, as that lib focuses on computational functions. > It was also mentioned that

[commons-lang] Util function in NumberUtils to count significant figures in a numeric string

2023-08-10 Thread Daniel Watson
I brought this up in commons-math and it was determined that that probably wasn't a good place for it, as that lib focuses on computational functions. It was also mentioned that commons-numbers was not a great place for the static util method either. Essentially the need for this relates to

Re: [commons-lang] Comments on new FunctionUtils / nested lambda feature

2023-08-06 Thread Daniel Watson
t; > I'm not sure the "nested" example API is quite what it should be, because > > the last argument is the default value, you cannot make the input > functions > > a vararg, which seems very limiting. I should be able to use the same API > > whether I need to g

Re: [commons-lang] Comments on new FunctionUtils / nested lambda feature

2023-08-06 Thread Rob Spoor
I'm saying the above independently of whether this type of code should be in Lang. Gary On Sat, Aug 5, 2023, 9:27 AM Daniel Watson wrote: Nice. Sounds like everyone is leaning towards "no". Would it be worth submitting a PR to include more usage examples - which I assume could also serve a

Re: [commons-lang] Comments on new FunctionUtils / nested lambda feature

2023-08-05 Thread Gary Gregory
the above independently of whether this type of code should be in Lang. Gary On Sat, Aug 5, 2023, 9:27 AM Daniel Watson wrote: > Nice. > > Sounds like everyone is leaning towards "no". Would it be worth submitting > a PR to include more usage examples - which I assume could al

Re: [commons-lang] Comments on new FunctionUtils / nested lambda feature

2023-08-05 Thread Daniel Watson
On Fri, Aug 4, 2023 at 9:11 PM Gary Gregory wrote: > The function() method is a great technique, it's now in Functions and > FailableFunction (git master). > > I'll see later if it can be used within Lang. I know I can use it in other > projects. > > Wrt an API for a varar

Re: [commons-lang] Comments on new FunctionUtils / nested lambda feature

2023-08-04 Thread Gary Gregory
The function() method is a great technique, it's now in Functions and FailableFunction (git master). I'll see later if it can be used within Lang. I know I can use it in other projects. Wrt an API for a vararg of functions that implements chaining internally, I'm not so sure. I've though I

Re: [commons-lang] Comments on new FunctionUtils / nested lambda feature

2023-08-04 Thread Gary Gregory
ty(FunctionUtils.nested(ParentBean::getChild,ChildBean::getName,"defaultName")); > > //or... > > > someFrameworkThing.setProperty(FunctionUtils.nested(ParentBean::getChild,ChildBean::getName,null)); > > > > The third parameter here is a String (typed genetic

Re: [commons-lang] Comments on new FunctionUtils / nested lambda feature

2023-08-04 Thread Daniel Watson
t; > someFrameworkThing.setProperty(FunctionUtils.nested(ParentBean::getChild,ChildBean::getName,"defaultName")); > > //or... > > > someFrameworkThing.setProperty(FunctionUtils.nested(ParentBean::getChild,ChildBean::getName,null)); > > > > The third parameter

Re: [commons-lang] Comments on new FunctionUtils / nested lambda feature

2023-08-04 Thread Rob Spoor
dBean cb = parentBean.getChild(); if(cb == null) return null; //or other default value else return cb.getName(); }); Given that commons-lang aims to extend existing language features, this seemed like a reasonable place for a nested lambda util class. So far my concerns are... 1. Does t

[commons-lang] Comments on new FunctionUtils / nested lambda feature

2023-08-04 Thread Daniel Watson
urned if the first call to getChild() returns null. e.g. it replaces something like... someFrameworkThing.setProperty((parentBean) -> { ChildBean cb = parentBean.getChild(); if(cb == null) return null; //or other default value else return cb.getName(); }); Given that commons-lang aims to extend

[ANNOUNCEMENT] Apache Commons Lang 3.13.0

2023-07-28 Thread Gary Gregory
The Apache Commons Team is pleased to announce Apache Commons Lang 3.13.0. Apache Commons Lang is a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang. Historical list of changes: https

Re: [VOTE] Release Apache Commons Lang 3.13.0 based on RC1

2023-07-27 Thread Gary Gregory
Rob >> >> >> > On Jul 23, 2023, at 3:57 PM, Gary Gregory wrote: >> > >> > We have fixed quite a few bugs and added some significant enhancements >> > since Apache Commons Lang 3.12.0 was released, so I would like to >> > release Apache Commons Lang 3.13

Re: [VOTE] Release Apache Commons Lang 3.13.0 based on RC1

2023-07-27 Thread Gary Gregory
s, > -Rob > > > > On Jul 23, 2023, at 3:57 PM, Gary Gregory > wrote: > > > > We have fixed quite a few bugs and added some significant enhancements > > since Apache Commons Lang 3.12.0 was released, so I would like to > > release Apache Commons L

Re: [VOTE] Release Apache Commons Lang 3.13.0 based on RC1

2023-07-27 Thread Rob Tompkins
ancements > since Apache Commons Lang 3.12.0 was released, so I would like to > release Apache Commons Lang 3.13.0. > > Apache Commons Lang 3.13.0 RC1 is available for review here: >https://dist.apache.org/repos/dist/dev/commons/lang/3.13.0-RC1 > (svn revision 63138) > > Th

Re: [VOTE] Release Apache Commons Lang 3.13.0 based on RC1

2023-07-27 Thread Rob Tompkins
Working on validating this now. -Rob > On Jul 23, 2023, at 3:57 PM, Gary Gregory wrote: > > We have fixed quite a few bugs and added some significant enhancements > since Apache Commons Lang 3.12.0 was released, so I would like to > release Apache Commons Lang 3.13.0. > >

Re: [VOTE] Release Apache Commons Lang 3.13.0 based on RC1

2023-07-26 Thread Bruno Kinoshita
3, 2023 at 3:57 PM Gary Gregory > wrote: > > > > We have fixed quite a few bugs and added some significant enhancements > > since Apache Commons Lang 3.12.0 was released, so I would like to > > release Apache Commons Lang 3.13.0. > > > > Apache Commons Lang

Re: [VOTE] Release Apache Commons Lang 3.13.0 based on RC1

2023-07-26 Thread Gary Gregory
ping :-) Gary On Sun, Jul 23, 2023 at 3:57 PM Gary Gregory wrote: > > We have fixed quite a few bugs and added some significant enhancements > since Apache Commons Lang 3.12.0 was released, so I would like to > release Apache Commons Lang 3.13.0. > > Apache Commons Lang 3.13.

[VOTE] Release Apache Commons Lang 3.13.0 based on RC1

2023-07-23 Thread Gary Gregory
We have fixed quite a few bugs and added some significant enhancements since Apache Commons Lang 3.12.0 was released, so I would like to release Apache Commons Lang 3.13.0. Apache Commons Lang 3.13.0 RC1 is available for review here: https://dist.apache.org/repos/dist/dev/commons/lang/3.13.0

Re: [commons-lang] 04/04: Throw IllegalArgumentException instead of InternalError in the builder package

2023-07-12 Thread Gary Gregory
There must be something messed up with EOLs despite my git autocrlf settings... sorry about that. Gary On Wed, Jul 12, 2023, 08:51 Gilles Sadowski wrote: > Hi. > > Le mer. 12 juil. 2023 à 14:44, a écrit : > > > > This is an automated email from the ASF dual-hosted git repository. > > > >

Re: [commons-lang] 04/04: Throw IllegalArgumentException instead of InternalError in the builder package

2023-07-12 Thread Gilles Sadowski
Hi. Le mer. 12 juil. 2023 à 14:44, a écrit : > > This is an automated email from the ASF dual-hosted git repository. > > ggregory pushed a commit to branch master > in repository https://gitbox.apache.org/repos/asf/commons-lang.git > > commit 2e3feda04337baa483bc26b66f238161dc6c97ac > Author:

Re: [commons-lang] 02/02: Add IntToIntFunction

2023-07-10 Thread Gary Gregory
You're right! Thank you. I'll clean it up. Gary On Mon, Jul 10, 2023, 09:18 Alex Herbert wrote: > Is this not the same as: > > java.util.function.IntUnaryOperator > > On Mon, 10 Jul 2023 at 12:56, wrote: > > > > This is an automated email from the ASF dual-hosted git repository. > > > >

Re: [commons-lang] 02/02: Add IntToIntFunction

2023-07-10 Thread Alex Herbert
Is this not the same as: java.util.function.IntUnaryOperator On Mon, 10 Jul 2023 at 12:56, wrote: > > This is an automated email from the ASF dual-hosted git repository. > > ggregory pushed a commit to branch master > in repository https://gitbox.apache.org/repos/asf/commons-lang.git > > commit

Re: [commons-lang] branch master updated: --corrected the isUnchecked method to check for null (#1079)

2023-07-03 Thread Gilles Sadowski
Hi. IIUC, the discussion sparked by that new code is currently converging towards deletion: https://markmail.org/message/nlqtk6na6nvwtelo In any case, several arguments (confusing, unnecessary, useless) were mentioned so that this commit be reverted. A new thread should be started on the

Re: [commons-lang] branch master updated: [LANG-1647] Add and ExceptionUtils.isChecked() and isUnchecked() #1069

2023-07-03 Thread Dimitrios Efthymiou
yes. You are right. Closed On Mon, 3 Jul 2023 at 10:12, Gilles Sadowski wrote: > Le lun. 3 juil. 2023 à 09:41, Alex Herbert a > écrit : > > > > On Mon, 3 Jul 2023 at 08:29, sebb wrote: > > > > > > Is null checked or unchecked? > > > > > > I think neither, so isUnchecked also needs to check

Re: [commons-lang] branch master updated: [LANG-1647] Add and ExceptionUtils.isChecked() and isUnchecked() #1069

2023-07-03 Thread Gilles Sadowski
Le lun. 3 juil. 2023 à 09:41, Alex Herbert a écrit : > > On Mon, 3 Jul 2023 at 08:29, sebb wrote: > > > > Is null checked or unchecked? > > > > I think neither, so isUnchecked also needs to check for null. > > > > I wonder whether it might be better to throw NPE in both cases for null. > > > >

Re: [commons-lang] branch master updated: [LANG-1647] Add and ExceptionUtils.isChecked() and isUnchecked() #1069

2023-07-03 Thread Alex Herbert
On Mon, 3 Jul 2023 at 08:29, sebb wrote: > > Is null checked or unchecked? > > I think neither, so isUnchecked also needs to check for null. > > I wonder whether it might be better to throw NPE in both cases for null. > > It may be confusing for users if not checked != unchecked. > e.g. it is

Re: [commons-lang] branch master updated: [LANG-1647] Add and ExceptionUtils.isChecked() and isUnchecked() #1069

2023-07-03 Thread sebb
Is null checked or unchecked? I think neither, so isUnchecked also needs to check for null. I wonder whether it might be better to throw NPE in both cases for null. It may be confusing for users if not checked != unchecked. e.g. it is tempting to code: if (isChecked(t)) { } else { // must be

Re: [commons-lang] branch master updated: [LANG-1647] Add and ExceptionUtils.isChecked() and isUnchecked() #1069

2023-07-02 Thread Elliotte Rusty Harold
On Mon, Jul 3, 2023 at 12:20 AM Gary Gregory wrote: > > Hi Elliotte: > > Might you be looking at some old code in the PR? > Just looking at what was posted in the email thread. It's a weird corner case not everyone thinks of. > The current code is: > > /** > * Checks if a throwable

Re: [commons-lang] branch master updated: [LANG-1647] Add and ExceptionUtils.isChecked() and isUnchecked() #1069

2023-07-02 Thread Dimitrios Efthymiou
I just noticed that the line return !isChecked(throwable) Means that if throwable is null then it will be considered unchecked. I will fix that tomorrow by doing Return throwable ! null && throwable instanceof Exception; On Mon, 3 Jul 2023, 01:20 Gary Gregory, wrote: > Hi Elliotte: > > Might

Re: [commons-lang] branch master updated: [LANG-1647] Add and ExceptionUtils.isChecked() and isUnchecked() #1069

2023-07-02 Thread Dimitrios Efthymiou
Hi Elliotte. I never thought of that, but I don't think it is Apache's problem if people exit the java convention On Mon, 3 Jul 2023, 01:02 Elliotte Rusty Harold, wrote: > On Sun, Jul 2, 2023 at 8:53 PM Alex Herbert > wrote: > > > public static boolean isUnchecked(final Throwable

Re: [commons-lang] branch master updated: [LANG-1647] Add and ExceptionUtils.isChecked() and isUnchecked() #1069

2023-07-02 Thread Gary Gregory
Hi Elliotte: Might you be looking at some old code in the PR? The current code is: /** * Checks if a throwable represents a checked exception * * @param throwable *The throwable to check. * @return True if the given Throwable is a checked exception.

Re: [commons-lang] branch master updated: [LANG-1647] Add and ExceptionUtils.isChecked() and isUnchecked() #1069

2023-07-02 Thread Elliotte Rusty Harold
On Sun, Jul 2, 2023 at 8:53 PM Alex Herbert wrote: > public static boolean isUnchecked(final Throwable throwable) { > return (throwable instanceof Error) || (throwable instanceof > RuntimeException); > } Not quite. It's also possible for someone to define a subclass of Throwable

Re: [commons-lang] branch master updated: [LANG-1647] Add and ExceptionUtils.isChecked() and isUnchecked() #1069

2023-07-02 Thread Alex Herbert
following commit(s) were added to refs/heads/master by this push: > new 98ef0a413 [LANG-1647] Add and ExceptionUtils.isChecked() and > isUnchecked() #1069 > 98ef0a413 is described below > > commit 98ef0a4138ac032923c4fb12a97b388bde354668 > Author: Gary Gregory > AuthorDate

Re: lang

2023-06-30 Thread Gary Gregory
Don't leave since tags out please, look in the pom.xml for the version. I plan on creating a release candidate out soon but I prefer to leave the code base as is for now because there are already a lot of new features and I plan and reviewing them before the RC and double-check things like docs.

Re: lang

2023-06-30 Thread sebb
On Fri, 30 Jun 2023 at 09:34, Niall Pemberton wrote: > > Hi Efthymiou, > > I would leave it out. You could guess that the next release is going to be > 3.13.0 - but that might not be the case or your change might no make it > into the next release for some reason. Making sure things like @since

Re: lang

2023-06-30 Thread Niall Pemberton
Hi Efthymiou, I would leave it out. You could guess that the next release is going to be 3.13.0 - but that might not be the case or your change might no make it into the next release for some reason. Making sure things like @since tags and release notes are all correct will be handled as part of

lang

2023-06-29 Thread Dimitrios Efthymiou
Hello. I am a new contributor. Say I am working on a new public method for a class, say, ExceptionUtils.java. What value do I put in the @since field in the JavaDoc of this method? Thank you for your time

Re: [lang] Considering a new String utility class

2023-03-20 Thread Xeno Amess
Otherwise I doubt the cost... From: Xeno Amess Sent: Monday, March 20, 2023 7:00:14 PM To: Commons Developers List Subject: Re: [lang] Considering a new String utility class I agree if it doesn't hurt more than 5% performance

Re: [lang] Considering a new String utility class

2023-03-20 Thread Xeno Amess
I agree if it doesn't hurt more than 5% performance. From: Peter Verhas Sent: Monday, March 20, 2023 4:16:17 PM To: Commons Developers List Subject: Re: [lang] Considering a new String utility class A few years ago when I refactored some code in this project, I

Re: [lang] Considering a new String utility class

2023-03-20 Thread Peter Verhas
PRs and issues like "[LANG-1682] Adding new startsWithAnyIgnoreCase > method and tests cases" keep popping up from time to time. > > My preference is to stop adding APIs that are variations of other APIs > based on case sensitivity (and Charset, Locale, and so on). > >

Re: [lang] Considering a new String utility class

2023-03-16 Thread Gary Gregory
Yes, an enum is better than a mystery boolean. Gary On Thu, Mar 16, 2023, 00:18 Matt Benson wrote: > On Wed, Mar 15, 2023 at 11:10 PM Hasan Diwan > wrote: > > > On Wed, 15 Mar 2023 at 20:55, Matt Benson wrote: > > > > > > > > > Any thoughts? > > > > > > > Something like: > > > > >

Re: [lang] Considering a new String utility class

2023-03-16 Thread Matt Benson
On Thu, Mar 16, 2023, 3:15 AM Hasan Diwan wrote: > Looking through StringUtils[1]m most of the methods have an "IgnoreCase" > variant, so I don't think one needs to DO anything to achieve this. If you > want to fold the ignoreCase variants, add something like: > > private static boolean

Re: [lang] Considering a new String utility class

2023-03-16 Thread Hasan Diwan
Looking through StringUtils[1]m most of the methods have an "IgnoreCase" variant, so I don't think one needs to DO anything to achieve this. If you want to fold the ignoreCase variants, add something like: private static boolean disregardCase = false; /** * Sets case-insensitivity in

Re: [lang] Considering a new String utility class

2023-03-15 Thread Matt Benson
On Wed, Mar 15, 2023 at 11:10 PM Hasan Diwan wrote: > On Wed, 15 Mar 2023 at 20:55, Matt Benson wrote: > > > > > > > Any thoughts? > > > > Something like: > > > StringUtils2.ignoreCase() /* makes the next functions case insensitive > */.respectCase(). * back to case-sensitive */ > > What about

  1   2   3   4   5   6   7   8   9   10   >