Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
Why do we construct the string here? We could do the trim on the string buffer, (avoiding allocations), and have the trim call return the string itself. (Saves one string copy.)
There's another place where trimByJustification is called, on the result of DataInputStream.getSomeString(...).
Really that should return a StringBuilder so that trim can happen in-place.