8148869: StringConcatFactory MH_INLINE_SIZED_EXACT strategy does not work with -XX:-CompactStrings

Reviewed-by: vlivanov, psandoz
This commit is contained in:
Aleksey Shipilev 2016-02-03 00:49:41 +03:00
parent 4df544f513
commit 68d21c3b1e
3 changed files with 127 additions and 3 deletions

View file

@ -342,4 +342,12 @@ final class StringConcatHelper {
return new String(buf, coder);
}
/**
* Provides the initial coder for the String.
* @return initial coder
*/
static byte initialCoder() {
return String.COMPACT_STRINGS ? String.LATIN1 : String.UTF16;
}
}