comparison src/share/vm/prims/jvmtiTagMap.cpp @ 23286:dd9cc155639c

Merge with jdk8u66-b17
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Thu, 07 Jan 2016 17:28:46 +0100
parents 7848fc12602b 9686a796c829
children
comparison
equal deleted inserted replaced
40:f6c066e3a996 42:b729a0c19008
1043 oop str, 1043 oop str,
1044 void* user_data) 1044 void* user_data)
1045 { 1045 {
1046 assert(str->klass() == SystemDictionary::String_klass(), "not a string"); 1046 assert(str->klass() == SystemDictionary::String_klass(), "not a string");
1047 1047
1048 typeArrayOop s_value = java_lang_String::value(str);
1049
1050 // JDK-6584008: the value field may be null if a String instance is
1051 // partially constructed.
1052 if (s_value == NULL) {
1053 return 0;
1054 }
1048 // get the string value and length 1055 // get the string value and length
1049 // (string value may be offset from the base) 1056 // (string value may be offset from the base)
1050 int s_len = java_lang_String::length(str); 1057 int s_len = java_lang_String::length(str);
1051 typeArrayOop s_value = java_lang_String::value(str);
1052 int s_offset = java_lang_String::offset(str); 1058 int s_offset = java_lang_String::offset(str);
1053 jchar* value; 1059 jchar* value;
1054 if (s_len > 0) { 1060 if (s_len > 0) {
1055 value = s_value->char_at_addr(s_offset); 1061 value = s_value->char_at_addr(s_offset);
1056 } else { 1062 } else {