diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 47a7ef53c9c1aa74b183392aef28850f99f05d55..8380e6ce580960b5906424728640aeec01b9d6d0 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,13 @@ +2005-05-04 Tom Tromey <tromey@redhat.com> + + * java/nio/channels/FileLock.java (toString): Entirely avoid + String "+". + +2005-05-04 Andrew Overholt <overholt@redhat.com> + + * java/nio/channels/FileLock.java (toString): Re-implement using + StringBuffer. + 2005-05-04 Thomas Fitzsimmons <fitzsim@redhat.com> * java/awt/ImageCapabilities.java: Document. diff --git a/libjava/java/nio/channels/FileLock.java b/libjava/java/nio/channels/FileLock.java index a4af08091bb3fe51a6e145580ceb116afc662107..46c5d8122795eab7ddc5f4b199234186514e151d 100644 --- a/libjava/java/nio/channels/FileLock.java +++ b/libjava/java/nio/channels/FileLock.java @@ -1,5 +1,5 @@ /* FileLock.java -- - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -132,16 +132,19 @@ public abstract class FileLock */ public final String toString() { - String toReturn = getClass().getName() + - "[" + position + ":" + size; - if (shared) - toReturn += " shared"; - else - toReturn += " exclusive"; - if (isValid()) - toReturn += " valid]"; - else - toReturn += " invalid]"; - return toReturn; + StringBuffer buf = new StringBuffer(getClass().getName()); + buf.append("["); + buf.append(position); + buf.append(":"); + buf.append(size); + if (shared) + buf.append(" shared"); + else + buf.append(" exclusive"); + if (isValid()) + buf.append(" valid]"); + else + buf.append(" invalid]"); + return buf.toString(); } }