changeset 25658:7a6a01c13279

8051057: Optimize StringCharBuffer.toString(int, int) Reviewed-by: smarks, alanb
author mduigou
date Fri, 18 Jul 2014 08:54:28 -0700
parents 659ec6a877c0
children 14764f69ed82
files jdk/src/share/classes/java/nio/StringCharBuffer.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/share/classes/java/nio/StringCharBuffer.java	Fri Jul 18 17:23:28 2014 +0200
+++ b/jdk/src/share/classes/java/nio/StringCharBuffer.java	Fri Jul 18 08:54:28 2014 -0700
@@ -100,7 +100,7 @@
     }
 
     final String toString(int start, int end) {
-        return str.toString().substring(start + offset, end + offset);
+        return str.subSequence(start + offset, end + offset).toString();
     }
 
     public final CharBuffer subSequence(int start, int end) {