am 95e6c6a5: Merge "Improve java.nio.Buffer.toString."
* commit '95e6c6a5a1765eea924a7e0fb3234cd0f72362e5':
Improve java.nio.Buffer.toString.
diff --git a/luni/src/main/java/java/nio/Buffer.java b/luni/src/main/java/java/nio/Buffer.java
index b90744b..d45919d 100644
--- a/luni/src/main/java/java/nio/Buffer.java
+++ b/luni/src/main/java/java/nio/Buffer.java
@@ -409,15 +409,11 @@
return this;
}
+ /**
+ * Returns a string describing this buffer.
+ */
@Override public String toString() {
- StringBuilder buf = new StringBuilder();
- buf.append(getClass().getName());
- buf.append(", status: capacity=");
- buf.append(capacity);
- buf.append(" position=");
- buf.append(position);
- buf.append(" limit=");
- buf.append(limit);
- return buf.toString();
+ return getClass().getName() +
+ "[position=" + position + ",limit=" + limit + ",capacity=" + capacity + "]";
}
}