Osvaldo Pinali Doederlein wrote:
public String toStringShared() {
// createShared() is a package-protected helper/ctor
String ret = String.createShared(value, 0, count);
// Reset value, so evil user can't abuse the buffer to change
the String.
value = EMPTY;
Osvaldo Doederlein wrote:
Looks like good stuff. And it remembers me from another old issue:
patterns of code that demand data copying that could often be avoided.
Every StringBuffer/StringBuilder is ultimately consumed by a toString()
invocation to produce the result String, and in 99% of all
Rémi Forax wrote:
Le 21/11/2009 07:48, Paulo Levi a écrit :
But i'm wondering why there isn't a global jvm system option for the
new Thread(runnable).start() to perserve stack traces at least until
the start method.
You don't need the VM for that, something like that should work:
public cla
cowwoc wrote:
I noticed that TreeMap (and maybe other classes) require a user to either
pass in a Comparator or ensure that all keys must implement Comparable. The
TreeMap code then uses a utility method whenever it needs to compare two
keys:
I'm not going to comment about performance, but ther