changeset 53227:c74f074c532a

8215380: Backout accidental change to String::length Reviewed-by: darcy, smarks
author redestad
date Fri, 14 Dec 2018 12:02:39 +0100
parents 74c8a506d23a
children 33d33996a638
files src/java.base/share/classes/java/lang/String.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/String.java	Fri Dec 14 06:39:14 2018 +0100
+++ b/src/java.base/share/classes/java/lang/String.java	Fri Dec 14 12:02:39 2018 +0100
@@ -664,7 +664,7 @@
      *          object.
      */
     public int length() {
-        return isLatin1() ? value.length : value.length >> UTF16;
+        return value.length >> coder();
     }
 
     /**