Page 1 of 1

Java-Compiler-String-Optimierung

Posted: 25 Dec 2024, 21:36
by Guest
Es scheint mir vernünftig, dass der Compiler so etwas annehmen wird:

Code: Select all

log.info("A really long logger message that is kind of a pain in the tucous " +
"and violates formatting standards by making the line to long");
und kompilieren Sie die beiden Strings zu einem. Ich bin mir ziemlich sicher, dass das wahr ist, aber ich würde gerne
meine Enten hintereinander haben, falls jemand das zur Sprache bringt.