Hi Martin, you are right. And in the line 297:
297 sb.append(getClass().getName()).append(' ').append(Integer.toString(hashCode())); Integer.toString() can be removed too. Best regards, Andrej Golovnin On Thu, Aug 21, 2014 at 3:26 PM, Martin Desruisseaux < martin.desruisse...@geomatys.fr> wrote: > I had a random look at the Webrev for TreeModelEvent.java and saw the > following new code: > > sb.append(Integer.toString(childIndices[counter])) > > Wouldn't the following be slightly more efficient? > > sb.append(childIndices[counter]) > > since Integer.toString(int) creates a temporary char[] array later > copied in the StringBuilder, while StringBuilder.append(int) writes > directly in the buffer internal array. > > > Martin > > > > Le 21/08/14 14:53, Wang Weijun a écrit : > > I filed a bug at > > > > https://bugs.openjdk.java.net/browse/JDK-8038277 > > > > Webrev in 3 parts at > > > > http://cr.openjdk.java.net/~weijun/8038277/client/webrev.00 > > http://cr.openjdk.java.net/~weijun/8038277/core/webrev.00/ > > http://cr.openjdk.java.net/~weijun/8038277/extra/webrev.00/ > > > > --Max > >