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

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 ''

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

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