8215380: Backout accidental change to String::length
authorredestad
Fri, 14 Dec 2018 12:02:39 +0100
changeset 53049 c74f074c532a
parent 53048 74c8a506d23a
child 53050 33d33996a638
8215380: Backout accidental change to String::length Reviewed-by: darcy, smarks
src/java.base/share/classes/java/lang/String.java
--- 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();
     }
 
     /**