changeset 9643:c57d32ee06b3

8141443: jdk/test/java/util/regex/RegExTest.java fails: No match found Summary: Do not sign extend when converting jbyte to jchar. Reviewed-by: shade, kvn
author thartmann
date Thu, 05 Nov 2015 15:29:46 +0100
parents f6fe5d638924
children f291674594da
files src/share/vm/opto/stringopts.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/stringopts.cpp	Thu Nov 05 15:08:58 2015 +0100
+++ b/src/share/vm/opto/stringopts.cpp	Thu Nov 05 15:29:46 2015 +0100
@@ -1520,7 +1520,7 @@
       Node* adr = kit.array_element_address(dst_array, index, T_BYTE);
       jchar val;
       if (src_is_byte) {
-        val = src_array->byte_at(i);
+        val = src_array->byte_at(i) & 0xff;
       } else {
         val = readChar(src_array, i++);
       }