mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8269280: (bf) Replace StringBuffer in *Buffer.toString()
Reviewed-by: alanb, chegar, bpb
This commit is contained in:
parent
c37988d079
commit
3a8f3d6cac
9 changed files with 649 additions and 16 deletions
|
@ -1666,16 +1666,11 @@ public abstract class $Type$Buffer
|
|||
* @return A summary string
|
||||
*/
|
||||
public String toString() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(getClass().getName());
|
||||
sb.append("[pos=");
|
||||
sb.append(position());
|
||||
sb.append(" lim=");
|
||||
sb.append(limit());
|
||||
sb.append(" cap=");
|
||||
sb.append(capacity());
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
return getClass().getName()
|
||||
+ "[pos=" + position()
|
||||
+ " lim=" + limit()
|
||||
+ " cap=" + capacity()
|
||||
+ "]";
|
||||
}
|
||||
|
||||
#end[!char]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue