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
Dear Apache Commons Community,
In my recent PR #1332, I replaced a StringBuilder usage with string
concatenation in a toString method for improved readability. During the
review, it was suggested this change should align with a broader project
standard.
Would the community support using string co
Hello serwserw...@gmail.com,
Thank you for your email.
Here are a few questions:
What passes the criteria of "simple cases"?
Should this be enforced or can it be enforced? With Checkstyle? Somethings
else?
Considering:
- that we support Java 8 and up to the current version.
- that we don't say
Hi Serw,
On 13.12.2024 22:08, Serw wrote:
Would the community support using string concatenation over StringBuilder
for simple cases? Modern JDKs (8+) optimize string concatenation
efficiently, making it both concise and performant.
Since the Javac compiler replaces string concatenation with
Hi Gary,
On 14.12.2024 17:45, Gary Gregory wrote:
What passes the criteria of "simple cases"?
I would classify all sequences of `new StringBuilder()`, `append` and
`toString` without any branching or loops as simple cases.
Should this be enforced or can it be enforced? With Checkstyle? Som
On Sat, Dec 14, 2024 at 1:56 PM Piotr P. Karwasz
wrote:
>
> Hi Gary,
>
> On 14.12.2024 17:45, Gary Gregory wrote:
> > What passes the criteria of "simple cases"?
>
> I would classify all sequences of `new StringBuilder()`, `append` and
> `toString` without any branching or loops as simple cases.
On Sat, Dec 14, 2024 at 3:08 PM Serw wrote:
> Would the community support using string concatenation over StringBuilder
> for simple cases? Modern JDKs (8+) optimize string concatenation
> efficiently, making it both concise and performant.
Interesting. Do you have a reference for that?
--
Ell
I presume this is referring to
https://openjdk.org/jeps/280 (JEP 280: Indify String Concatenation) which
was implemented in Java 9.
On Sat, Dec 14, 2024, 6:26 PM Elliotte Rusty Harold
wrote:
> On Sat, Dec 14, 2024 at 3:08 PM Serw wrote:
>
> > Would the community support using string concatenat