comparison src/share/vm/classfile/symbolTable.cpp @ 10155:f258c5828eb8

8011773: Some tests on Interned String crashed JVM with OOM Summary: Instead of terminating the VM, throw OutOfMemoryError exceptions. Reviewed-by: coleenp, dholmes
author hseigel
date Mon, 29 Apr 2013 16:13:57 -0400
parents ede380e13960
children a5d6f0c3585f
comparison
equal deleted inserted replaced
10153:3c9b7ef92c61 10155:f258c5828eb8
733 { 733 {
734 if (string == NULL) return NULL; 734 if (string == NULL) return NULL;
735 ResourceMark rm(THREAD); 735 ResourceMark rm(THREAD);
736 int length; 736 int length;
737 Handle h_string (THREAD, string); 737 Handle h_string (THREAD, string);
738 jchar* chars = java_lang_String::as_unicode_string(string, length); 738 jchar* chars = java_lang_String::as_unicode_string(string, length, CHECK_NULL);
739 oop result = intern(h_string, chars, length, CHECK_NULL); 739 oop result = intern(h_string, chars, length, CHECK_NULL);
740 return result; 740 return result;
741 } 741 }
742 742
743 743