Patch: MAXPATHLEN usage - PR21821
Tom Tromey
tromey@redhat.com
Thu Jun 2 16:36:00 GMT 2005
Bryce> Why couldn't StringBuilder do sharing with copy-on-write, like
Bryce> java.lang.StringBuffer does?
StringBuilder is unsynchronized, and StringBuilder.toString() doesn't
have "hand-off" semantics -- it keeps the data in the StringBuilder.
So, if you avoid copying there will be a window where the user could
potentially mutate a String. There was a thread about this a while
back on classpath-patches.
Tom
More information about the Java-patches
mailing list