Re: [lang] consistency converting dates FastDateFormat vs Calendar

2025-02-11 Thread Gary Gregory
If an API is deprecated, please make sure the @deprecated comment states clearly with an @link what the replacement is. This will allow people who use OpenRewrite to configure their wares accordingly. IOW, don't give users a headache ;-) Gary On Tue, Feb 11, 2025 at 7:18 AM Gilles Sadowski wrot

Re: [lang] consistency converting dates FastDateFormat vs Calendar

2025-02-11 Thread Gilles Sadowski
Hi. Le mar. 11 févr. 2025 à 12:56, Elliotte Rusty Harold a écrit : > > I am not surprised you've found issues with FastDateFormat. I'd be > more surprised if you didn't. Handling time zones is *hard* and almost > everyone gets it wrong, at least at first. In 2025 I wouldn't use > either SimpleDat

Re: [lang] consistency converting dates FastDateFormat vs Calendar

2025-02-11 Thread Elliotte Rusty Harold
I am not surprised you've found issues with FastDateFormat. I'd be more surprised if you didn't. Handling time zones is *hard* and almost everyone gets it wrong, at least at first. In 2025 I wouldn't use either SimpleDateFormat or FastDateFormat. Use java.time and java.time.formatter instead. These

Re: [LANG] [DISCUSS] Java Modularity support in commons-lang3

2024-12-15 Thread Mark Struberg
> Am 14.12.2024 um 12:00 schrieb Piotr P. Karwasz : > > Hi Mark, > > On 9.12.2024 17:37, Mark Struberg wrote: >> c) try using this on a class which contains e.g. an ArrayList, a Set or a >> Map. It will e.g. use List#equals() which also does equals() on it's items >> (btw, I explained this to

Re: [LANG] [DISCUSS] Java Modularity support in commons-lang3

2024-12-14 Thread Piotr P. Karwasz
Hi Mark, On 9.12.2024 17:37, Mark Struberg wrote: c) try using this on a class which contains e.g. an ArrayList, a Set or a Map. It will e.g. use List#equals() which also does equals() on it's items (btw, I explained this to you already...). Which is NOT what users expect. Instead it should i

Re: [Lang] Method name (Was: [PR] Fb jpms - fixes for [...])

2024-12-09 Thread Gilles Sadowski
Le lun. 9 déc. 2024 à 16:36, sebb a écrit : > > On Mon, 9 Dec 2024 at 15:19, Gilles Sadowski wrote: > > > > Hi. > > > > Following up here on the question on GH: > > > > > why is this disussion again NOT happening on any ASF list but here where > > > it does not get reflected to any ASF list afai

Re: [Lang] Method name (Was: [PR] Fb jpms - fixes for [...])

2024-12-09 Thread sebb
On Mon, 9 Dec 2024 at 15:19, Gilles Sadowski wrote: > > Hi. > > Following up here on the question on GH: > > > why is this disussion again NOT happening on any ASF list but here where it > > does not get reflected to any ASF list afaict? > > As Sebb wrote (below), the discussion is sent to "issue

Re: [Lang] Method name (Was: [PR] Fb jpms - fixes for [...])

2024-12-09 Thread Gilles Sadowski
Hi. Following up here on the question on GH: > why is this disussion again NOT happening on any ASF list but here where it > does not get reflected to any ASF list afaict? As Sebb wrote (below), the discussion is sent to "issues@". Subscribed people can see what is discussed on GH but their ev

Re: [Lang] Method name (Was: [PR] Fb jpms - fixes for [...])

2024-12-07 Thread sebb
On Sat, 7 Dec 2024 at 16:43, Mark Struberg wrote: > > Could you please also take a look? I peeked at commits@ and notifications@ > and didn't see it. So maybe I overlooked them or they are not there. Did you look at issues@? What exactly is missing? > txs and LieGrue, > strub > > > Am 07.12.20

Re: [Lang] Method name (Was: [PR] Fb jpms - fixes for [...])

2024-12-07 Thread Mark Struberg
Could you please also take a look? I peeked at commits@ and notifications@ and didn't see it. So maybe I overlooked them or they are not there. txs and LieGrue, strub > Am 07.12.2024 um 17:05 schrieb sebb : > > On Sat, 7 Dec 2024 at 14:00, Mark Struberg > wrot

Re: [Lang] Method name (Was: [PR] Fb jpms - fixes for [...])

2024-12-07 Thread sebb
On Sat, 7 Dec 2024 at 14:00, Mark Struberg wrote: > > Hi Gilles! > > > Maybe something like `isNonIntrospectibleClass()`? > > Thanks, that's a really good name! > I've changed it and pushed it to the PR. > > > Btw, on a more general level. > It seems that the discussions on the PRs are NOT mirrore

Re: [Lang] Method name (Was: [PR] Fb jpms - fixes for [...])

2024-12-07 Thread Mark Struberg
Hi Gilles! > Maybe something like `isNonIntrospectibleClass()`? Thanks, that's a really good name! I've changed it and pushed it to the PR. Btw, on a more general level. It seems that the discussions on the PRs are NOT mirrored on any ASF lists? Nor does the discussions on slack obviously. And

Re: [LANG] Normalizing StringUtils output

2024-12-04 Thread Piotr P. Karwasz
Hi Gary, On 4.12.2024 12:44, Gary Gregory wrote: The StringUtils methods return a mix of null and "" for each method on null input. Each method does one of the following: - null out for null in - "" out for null in - null for null and "" for "" - throw an NPE We definitively need to put some

Re: [LANG] Normalizing StringUtils output

2024-12-04 Thread Dávid Szigecsán
Hi, In my opinion it would be nice if all the methods do the same for the same null or empty string input and would be consistent, but... I won't change the existing API in the current 3.x version. So I think we should fix them only in 4.0. However, we should fix it in the Strings class, before it

Re: [LANG] RuntimeEnvironment class

2024-12-01 Thread sebb
On Sun, 1 Dec 2024 at 14:35, Piotr P. Karwasz wrote: > > Hi sebb, > > On 1.12.2024 12:27, sebb wrote: > > It's not clear to me that this belongs in LANG. > > I tend to agree with you. Since the purpose of containers is to run > applications the same way they would run on the host system, I don't >

Re: [LANG] RuntimeEnvironment class

2024-12-01 Thread Piotr P. Karwasz
Hi sebb, On 1.12.2024 12:27, sebb wrote: It's not clear to me that this belongs in LANG. I tend to agree with you. Since the purpose of containers is to run applications the same way they would run on the host system, I don't believe this method belongs to any Java library. Unfortunately s

Re: [LANG] RuntimeEnvironment class

2024-12-01 Thread Gary Gregory
Hi Sebb, This is currently under discussion with System D as the lead candidate to emulate. This is IMO, a feature that is becoming more important as time goes on. See the open PRs on GitHub and Piotr's suggested direction. Gary On Sun, Dec 1, 2024, 6:27 AM sebb wrote: > Just noticed the Run

Re: [LANG] LANG-1747: Measure the execution time of functional interfaces #1254

2024-08-17 Thread Gary Gregory
Hello all, Whichever names we pick if we accept the contribution, I think it is best to look at the method names in context, not standalone. For example, you would "say": stopWatch.accept(x -> ...) and so on. I find it simpler to match the new names with the delegate but YMMV ;-) All the name

Re: [LANG] LANG-1747: Measure the execution time of functional interfaces #1254

2024-08-17 Thread Peter Burka
I think this is a useful addition, but I wonder if these new APIs are misnamed: StopWatch::test doesn't actually test, nor does StopWatch::accept consume. Instead, these all wrap lambdas in a timed version of the same type. (There's probably some lambda calculus terminology for this.) I'd propose

Re: [LANG] Add Any Checks for Not Checks in StringUtils

2024-06-13 Thread Department 8
No problem this was actually my first time engaging in any Open source contribution, so it was a good way to know what should be done in quality and quantity for any open source contribution, so thanks for helping me learn as well. On Thu, Jun 13, 2024, 19:13 Gary D. Gregory wrote: > On 2024/06/

Re: [LANG] Add Any Checks for Not Checks in StringUtils

2024-06-13 Thread Gary D. Gregory
On 2024/06/13 00:22:13 Department 8 wrote: > I see the point you are making. Thanks for taking the time to review it. And thank you for engaging with us on improving this component! :-) Gary > > On Wed, Jun 12, 2024, 23:30 Gary Gregory wrote: > > > See also my comment in the PR. > > > > Gary

Re: [LANG] Add Any Checks for Not Checks in StringUtils

2024-06-12 Thread Department 8
I see the point you are making. Thanks for taking the time to review it. On Wed, Jun 12, 2024, 23:30 Gary Gregory wrote: > See also my comment in the PR. > > Gary > > On Wed, Jun 12, 2024, 1:22 PM Department 8 > wrote: > > > Haha! It was in fact because of other methods that have simple negatio

Re: [LANG] Add Any Checks for Not Checks in StringUtils

2024-06-12 Thread Gary Gregory
See also my comment in the PR. Gary On Wed, Jun 12, 2024, 1:22 PM Department 8 wrote: > Haha! It was in fact because of other methods that have simple negation > that I thought maybe giving a PR would be Okay :) > > I think that many times, it is the Boolean Logic that may trivial for us, > but

Re: [LANG] Add Any Checks for Not Checks in StringUtils

2024-06-12 Thread Department 8
Haha! It was in fact because of other methods that have simple negation that I thought maybe giving a PR would be Okay :) I think that many times, it is the Boolean Logic that may trivial for us, but for some who may be using them to have a utility methods like isNotBlank aka (!isBlank) maybe help

Re: [LANG] Add Any Checks for Not Checks in StringUtils

2024-06-12 Thread Alex Herbert
On Wed, 12 Jun 2024 at 18:03, Department 8 wrote: > Sorry Alex just now saw your email, before sending out the PR! > > I had done just for isAllEmpty and isAllBlank. > > Can you tell me more on what can be done, when you said the following: > > If you are simply negating the result of another met

Re: [LANG] Add Any Checks for Not Checks in StringUtils

2024-06-12 Thread Department 8
Sorry Alex just now saw your email, before sending out the PR! I had done just for isAllEmpty and isAllBlank. Can you tell me more on what can be done, when you said the following: If you are simply negating the result of another method then this use case may be better served with addition of a

Re: [LANG] Add Any Checks for Not Checks in StringUtils

2024-06-12 Thread Department 8
I just realized the subject name is bad. But here are the two small methods I propose - *isAnyNotBlank* and *isAnyNotEmpty*. Please find the pull request as here: https://github.com/apache/commons-lang/pull/1234 On Wed, 12 Jun 2024 at 21:52, Department 8 wrote: > Hey! > > Recently when using St

Re: [LANG] Add Any Checks for Not Checks in StringUtils

2024-06-12 Thread Alex Herbert
Hi, On Wed, 12 Jun 2024 at 17:23, Department 8 wrote: > Hey! > > Recently when using StringUtils in one of our projects I had felt the > urgent need to have a utility method like => isAnyNotBlank. > > I was able to achieve this using the negation of isAllBlank, so I am > thinking of introducing

Re: Re: [LANG] Support single quotes in DurationFormatUtils methods' formats

2024-05-31 Thread Daniel Watson
Honestly I think not supporting empty literals is just as big a limitation as not supporting single quotes, so IMO we'd just be trading one limitation for another. i.e. if someone were to need empty literals, the things they would have to do to use them are the same things they'd have to do to supp

Re: Re: [LANG] Support single quotes in DurationFormatUtils methods' formats

2024-05-30 Thread Gary D. Gregory
I'm OK with Sebb's solution [1] Any further thoughts here? Gary [1] https://github.com/apache/commons-lang/pull/1227 On 2024/05/29 13:37:40 Mike Drob wrote: > On Wed, May 29, 2024 at 8:17 AM Gary Gregory wrote: > > > (Sorry for the top post, phone) > > > > A case I can imagine an empty '' occu

Re: Re: [LANG] Support single quotes in DurationFormatUtils methods' formats

2024-05-29 Thread Mike Drob
On Wed, May 29, 2024 at 8:17 AM Gary Gregory wrote: > (Sorry for the top post, phone) > > A case I can imagine an empty '' occurring is when the format string itself > is built programmatically for example a '%s' or using string concatenate of > a variable that holds a string where that string ca

Re: Re: [LANG] Support single quotes in DurationFormatUtils methods' formats

2024-05-29 Thread Gary Gregory
(Sorry for the top post, phone) A case I can imagine an empty '' occurring is when the format string itself is built programmatically for example a '%s' or using string concatenate of a variable that holds a string where that string can be empty or an "s" to mark a plural or a quote for example.

Re: Re: [LANG] Support single quotes in DurationFormatUtils methods' formats

2024-05-29 Thread sebb
On Sun, 26 May 2024 at 23:37, sebb wrote: > > On Sun, 26 May 2024 at 08:25, Laertes Moustakas wrote: > > > > Hello Gary, > > > > Thank you for your response. Some of the new assertions indeed fail when > > interpreting the duplicate single quote as an escaped quote instead of a > > closing and

Re: Re: [LANG] Support single quotes in DurationFormatUtils methods' formats

2024-05-26 Thread sebb
On Sun, 26 May 2024 at 08:25, Laertes Moustakas wrote: > > Hello Gary, > > Thank you for your response. Some of the new assertions indeed fail when > interpreting the duplicate single quote as an escaped quote instead of a > closing and opening quote. In particular, "y' ''years' M 'months'" is

RE: Re: [LANG] Support single quotes in DurationFormatUtils methods' formats

2024-05-26 Thread Laertes Moustakas
Hello Gary, Thank you for your response. Some of the new assertions indeed fail when interpreting the duplicate single quote as an escaped quote instead of a closing and opening quote. In particular, "y' ''years' M 'months'" is interpreted as "4 'years 0 months" while the expected text lacks th

Re: [LANG] Support single quotes in DurationFormatUtils methods' formats

2024-05-25 Thread Gary Gregory
Hello Laertes, Thank you for your interest in improving Apache Commons Lang :-) Do you foresee any compatibility issues for existing call sites and format strings? For example, can you make your use cases work and still support: https://github.com/apache/commons-lang/blob/d861f1b2116a41a45949d1

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-08 Thread Mark Struberg
Tbh, I was really surprised to find out that in Java8 the code did indeed also introspect internal fields of all those java.util.* foundation classes. It's imo pure luck that it did work so well for a decade for anything Set, List, Map, etc. Working on a patch with all those discussed changes.

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-08 Thread Gary Gregory
The next question is whether any of this should be mentioned/recorded in the Javadoc or at least in a code comment. Gary On Fri, Mar 8, 2024, 5:24 AM Mark Struberg wrote: > Hi Gary! > > Yes, this would be really slow. Plus after further thinking about it, I > guess it doesn't add anything over

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-08 Thread Mark Struberg
Hi Daniel! Yes, you are right. As written in my mail to Gary: I think it would be enough for now if we'd come to the same results as before the module privacy restrictions. If we do better later on it is an optional bonus. LieGrue, strub > Am 07.03.2024 um 15:39 schrieb Daniel Watson : > > O

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-08 Thread Mark Struberg
Hi Gary! Yes, this would be really slow. Plus after further thinking about it, I guess it doesn't add anything over the required existing behaviour imo. Until now reflectionEquals did simply dig into the Class.getDeclaredFields of those java.util.* classes. So it only did compare the EXAKT same

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-07 Thread Daniel Watson
One comment about the collection comparison... For any collection that actually implements List, equality should *include* order, not attempt to ignore it, right? The contract of a list is that the order is consistent, and two lists with the same items in different order, should not be considered

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-07 Thread Gary D. Gregory
On 2024/03/07 06:58:30 Mark Struberg wrote: > The question to me is how we can make it more robust. > In a Collection (but actually also in most lists) the order in which you get > the values (Iterator or get(i)) is not deterministic. It can be different in > one list than in another - even if th

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-07 Thread sebb
Could one calculate the hashes for each entry, sort them, and then generate the hash for the collection? On Thu, 7 Mar 2024 at 06:59, Mark Struberg wrote: > > The question to me is how we can make it more robust. > In a Collection (but actually also in most lists) the order in which you get > th

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-06 Thread Mark Struberg
The question to me is how we can make it more robust. In a Collection (but actually also in most lists) the order in which you get the values (Iterator or get(i)) is not deterministic. It can be different in one list than in another - even if they contain the exact same items. Not yet sure how t

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-06 Thread Gary Gregory
Ah, right, custom "non-equalable" _inside_ Collections and Maps... For the diff, I'd suggest you test and iterable over a Collection instead of a List. Then you'd need a separate test and traversal for Map instances. (Still no common super-interface in Java 21 for Collections and Maps...) Gary

Re: [LANG] EqualsBuilder#reflectionEquals feature brainstorming

2024-03-06 Thread Mark Struberg
Hi Gregory! I did try this out and figured that I didn't think it though. Maybe I need to go a few steps back and explain the problem: I have the following constellation public class SomeInnerDTO {int field..} // NOT implements equals! public class TheOuterDTO{ List innerList;..} My problem is

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. F

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 section "Apache Commons Lang 3.13.0", th

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 see

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 - 1e-5)**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: > > @RepeatedTest(

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 i

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 in

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. > > Le me

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 registe

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

2023-09-27 Thread Marc Cappelletti
Hello Gilles, Thanks for the details and the comment. By the way, do we comment directly on the PR or strictly via this mailing list? Kind regards, Marc Le mer. 27 sept. 2023 à 11:30, Gilles Sadowski a écrit : > Hello. > > As this list is shared among many (30+) "components" of the "Commons"

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 ta

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 t

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% perfor

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 proje

Re: [lang] Considering a new String utility class

2023-03-20 Thread Peter Verhas
A few years ago when I refactored some code in this project, I created such a class for myself, as I was experimenting at that time with how to generate fluent API automatically. I will look it up where it is and give here a pointer. That may be a starting point and as you can guessed from the fact

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: > > > > > StringUtils

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 disre

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 s

Re: [lang] Considering a new String utility class

2023-03-15 Thread Hasan Diwan
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 */ ? -- H -- OpenPGP: https://hasan.d8u.us/openpgp.asc If you wish to request my time

Re: [lang] Considering a new String utility class

2023-03-15 Thread Matt Benson
On Wed, Mar 15, 2023 at 9:47 PM Gary Gregory wrote: > On Wed, Mar 15, 2023 at 9:11 AM Matt Benson wrote: > > > > Agreed, Gary. Sounds promising. Maybe consider the "modern" terser > builder > > style a la AWS builders or such (i.e. since the "mutator" isn't a classic > > Java beans mutator in an

Re: [lang] Considering a new String utility class

2023-03-15 Thread Hasan Diwan
+1 On Wed, 15 Mar 2023 at 05:58, Gary Gregory wrote: > 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 Char

Re: [lang] Considering a new String utility class

2023-03-15 Thread Gary Gregory
On Wed, Mar 15, 2023 at 9:11 AM Matt Benson wrote: > > Agreed, Gary. Sounds promising. Maybe consider the "modern" terser builder > style a la AWS builders or such (i.e. since the "mutator" isn't a classic > Java beans mutator in any case, you can omit "set"). So a setter is called foo(value) and

Re: [lang] Considering a new String utility class

2023-03-15 Thread Jochen Wiedmann
On Wed, Mar 15, 2023 at 1:58 PM Gary Gregory wrote: > Instead, I can see adding a new String utility class that tracks such > attributes on its instance such that you'd say something like: > - Strings.caseSensitive().someOperation(...) > - Strings.caseInsensitive().someOperation(...). Agreed 100

Re: [lang] Considering a new String utility class

2023-03-15 Thread Matt Benson
Agreed, Gary. Sounds promising. Maybe consider the "modern" terser builder style a la AWS builders or such (i.e. since the "mutator" isn't a classic Java beans mutator in any case, you can omit "set"). Matt On Wed, Mar 15, 2023, 8:06 AM Melloware wrote: > This sounds like a great idea! > > > On

Re: [lang] Considering a new String utility class

2023-03-15 Thread Melloware
This sounds like a great idea! On 3/15/2023 8:58 AM, Gary Gregory wrote: 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 sensitivi

Re: [Lang] "CalendarUtilsTest" fails, or not...

2022-12-07 Thread Gilles Sadowski
Le mer. 7 déc. 2022 à 10:04, sebb a écrit : > > This could be caused by tests occurring in random order. If there is a > test that changes the global locale, and fails to reset it, behaviour > will depend on when the failing test is run in relation to others. If > you still have the logs, try comp

Re: [Lang] "CalendarUtilsTest" fails, or not...

2022-12-07 Thread sebb
This could be caused by tests occurring in random order. If there is a test that changes the global locale, and fails to reset it, behaviour will depend on when the failing test is run in relation to others. If you still have the logs, try comparing the order of tests. On Wed, 7 Dec 2022 at 01:34,

Re: [Lang] "CalendarUtilsTest" fails, or not...

2022-12-06 Thread Gary Gregory
Interesting, the GH builds are green: https://github.com/apache/commons-lang/actions But the environment is different from yours: Maven home: /usr/share/apache-maven-3.8.6 Java version: 11.0.17, vendor: Eclipse Adoptium, runtime: /usr/lib/jvm/temurin-11-jdk-amd64 Default locale: en, platform enco

Re: [lang] What does the animal-sniffer-maven-plugin compare against?

2022-05-02 Thread Jochen Wiedmann
det: Monday, May 2, 2022 8:05:48 PM > An: Apache Commons Developers List > Betreff: Re: [lang] What does the animal-sniffer-maven-plugin compare against? > > Followup question: Should the following reveal a property definition? > Because, I only see uses of ${javaTarget.majorVersio

Re: [lang] What does the animal-sniffer-maven-plugin compare against?

2022-05-02 Thread Bernd Eckenfels
Bernd -- http://bernd.eckenfels.net Von: Jochen Wiedmann Gesendet: Monday, May 2, 2022 8:05:48 PM An: Apache Commons Developers List Betreff: Re: [lang] What does the animal-sniffer-maven-plugin compare against? Followup question: Should the following reveal a

Re: [lang] What does the animal-sniffer-maven-plugin compare against?

2022-05-02 Thread Jochen Wiedmann
Followup question: Should the following reveal a property definition? Because, I only see uses of ${javaTarget.majorVersion}, and no definition. $ mvn help:effective-pom | grep -i majorVersion java${javaTarget.majorVersion}${javaTarget.minorVersion} java${javaTarget.majorVersion}${javaTarget

RE: [lang] how to submit a proposal for a new component?

2022-04-27 Thread Boo, Guy
22 06:16 To: Commons Developers List Subject: Re: [lang] how to submit a proposal for a new component? Came here to suggest Commons Graph too. The GH repo had some recent-ish activity, Amey created some issues in JIRA too and submitted PR's. I haven't had time yet to look into that ag

Re: [lang] how to submit a proposal for a new component?

2022-04-27 Thread Bruno Kinoshita
t; already releases multiple libs. > > > > Gruss > > Bernd > > -- > > http://bernd.eckenfels.net > > ________ > > Von: Boo, Guy > > Gesendet: Wednesday, April 27, 2022 5:39:07 PM > > An: Commons Developers List >

Re: [lang] how to submit a proposal for a new component?

2022-04-27 Thread Matt Sicker
ednesday, April 27, 2022 5:39:07 PM > An: Commons Developers List > Betreff: RE: [lang] how to submit a proposal for a new component? > > My project has no dependencies, and its definition of "graph" is basically > java.util.function.Function>. So the graph doesn&#

Re: [lang] how to submit a proposal for a new component?

2022-04-27 Thread Bernd Eckenfels
27, 2022 5:39:07 PM An: Commons Developers List Betreff: RE: [lang] how to submit a proposal for a new component? My project has no dependencies, and its definition of "graph" is basically java.util.function.Function>. So the graph doesn't even need to be reified in memor

RE: [lang] how to submit a proposal for a new component?

2022-04-27 Thread Boo, Guy
ect my code would be too tiny and off-focus for projects with specific domains like -xpath or -ognl. Maybe collections, but so far I think my best guess is still lang... Thanks very much for your help! -Original Message- From: Gary Gregory Sent: Wednesday, April 27, 2022 23:04 To: Commo

Re: [lang] how to submit a proposal for a new component?

2022-04-27 Thread Gary Gregory
Also -scxml Gary On Wed, Apr 27, 2022, 11:02 Bernd Eckenfels wrote: > Hello Guy, > > I think Apache Commons might be a good fit, but it depends a bit on your > dependencies. > > You could also check -ognl, -xpath or -rdf components, they are all offer > similar features. > > If you want to trav

Re: [lang] how to submit a proposal for a new component?

2022-04-27 Thread Bernd Eckenfels
Hello Guy, I think Apache Commons might be a good fit, but it depends a bit on your dependencies. You could also check -ognl, -xpath or -rdf components, they are all offer similar features. If you want to traverse POJO then commons-lang might be an option (but then it needs to be leightweigt)

Re: [Lang]Consult

2021-12-03 Thread Alex P
You need to use "splitByWholeSeparator" instead of "split" https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringUtils.html#splitByWholeSeparator-java.lang.String-java.lang.String- On Fri, Dec 3, 2021 at 7:50 AM time_crossing wrote: > > Thanks for response. > I kno

Re: [Lang]Consult

2021-12-03 Thread time_crossing
Thanks for response. I know System.out.println(StringUtils.split(code,"_")[1]); Will retrun expected result. But I think when I use String code = "constant_true"; System.out.println(StringUtils.split(code,"constant_")[0]); At first I thought return is (“" and “true”) In fact this code will ret

Re: [lang] Failing test on Java 16-EA.

2021-05-10 Thread Jaikiran Pai
This issue should be fixed in the recently released JDK 17 EA 21 build https://www.mail-archive.com/dev@commons.apache.org/msg70950.html -Jaikiran On 2021/04/13 12:04:21, Jaikiran Pai wrote: > Hello Gary, > > I had a look at this one and I was able to reproduce this. Based on my > reading of

Re: [lang] Failing test on Java 16-EA.

2021-04-13 Thread Jaikiran Pai
Hello Gary, I had a look at this one and I was able to reproduce this. Based on my reading of the code and what it does, IMO, this is a JDK issue. Since this was previously raised and reported in this list here[1] and a JDK issue was created https://bugs.openjdk.java.net/browse/JDK-8262108, I d

Re: [lang] Failing test on Java 16-EA.

2021-03-28 Thread Gary Gregory
I'm till looking for help on getting LANG working on Java 16... Gary On Sat, Mar 20, 2021, 21:39 Gary Gregory wrote: > Now that Java 16 is out, we really need to look at this IMO but I would > like help from the community. > > My initial guess that this a JDK bug might be wrong and it could be

Re: [lang] Failing test on Java 16-EA.

2021-03-21 Thread Matt Sicker
And the two linked bugs in Java15BugFastDateParserTest.java are marked fixed already: https://bugs.openjdk.java.net/browse/JDK-8248655 https://bugs.openjdk.java.net/browse/JDK-8248434 On Sun, 21 Mar 2021 at 10:26, Matt Sicker wrote: > > Looks related to some locale changes most likely? There are

Re: [lang] Failing test on Java 16-EA.

2021-03-21 Thread Matt Sicker
Looks related to some locale changes most likely? There are also a couple test failures that are likely due to illegal reflective access. Case in point, one of the tests has an InaccessibleObject error message. Tested on: openjdk version "16" 2021-03-16 OpenJDK Runtime Environment AdoptOpenJDK (b

Re: [lang] Failing test on Java 16-EA.

2021-03-20 Thread Gary Gregory
Now that Java 16 is out, we really need to look at this IMO but I would like help from the community. My initial guess that this a JDK bug might be wrong and it could be an issue in our code. Gary On Tue, Feb 23, 2021, 22:13 Gary Gregory wrote: > Hi All: > > If you feel so inclined, I'd like h

Re: Re: Re: [lang] Introduce @NonNull, and @Nullable

2021-02-19 Thread Xeno Amess
%E2%80%93ought_problem. > > > > I thought more about something like a guide to be consulted before > > > > introducing a new dependency, instead of a dashboard disclosing the > > sins > > > > post fact :-) > > > > > > > > I take t

Re: Re: Re: [lang] Introduce @NonNull, and @Nullable

2021-02-15 Thread Gary Gregory
gt; > > I take that as a no. > > > > > > Thomas > > > > > > > > > > > > Gesendet: Montag, 15. Februar 2021 um 16:59 Uhr > > > Von: "Gary Gregory" > > > An: "Commons Developers List" > >

Re: Re: Re: [lang] Introduce @NonNull, and @Nullable

2021-02-15 Thread sebb
e sins > > post fact :-) > > > > I take that as a no. > > > > Thomas > > > > > > > > Gesendet: Montag, 15. Februar 2021 um 16:59 Uhr > > Von: "Gary Gregory" > > An: "Commons Developers List" > > Betreff: R

Re: Re: Re: [lang] Introduce @NonNull, and @Nullable

2021-02-15 Thread Gary Gregory
t something like a guide to be consulted before > introducing a new dependency, instead of a dashboard disclosing the sins > post fact :-) > > I take that as a no. > > Thomas > > > > Gesendet: Montag, 15. Februar 2021 um 16:59 Uhr > Von: "Gary Gregory"

Aw: Re: Re: [lang] Introduce @NonNull, and @Nullable

2021-02-15 Thread Thomas Schapitz
16:59 Uhr Von: "Gary Gregory" An: "Commons Developers List" Betreff: Re: Re: [lang] Introduce @NonNull, and @Nullable I do not think we need a wiki since each project should have a Maven generated page like https://commons.apache.org/proper/commons-lang/dependencies.html G

  1   2   3   4   5   6   7   8   9   10   >