Revert "Add missing null check to String::ToCharArray"
Does not work with the interpreter.
Bug: 25641543
This reverts commit 952d608062eec2d7f47f9b45dba935ad8b4d23e5.
Change-Id: Ic112fa69c7ddd119cbccc5b65007b5ee4dfccd09
diff --git a/runtime/mirror/string.cc b/runtime/mirror/string.cc
index be869d4..45610dc 100644
--- a/runtime/mirror/string.cc
+++ b/runtime/mirror/string.cc
@@ -254,11 +254,7 @@
StackHandleScope<1> hs(self);
Handle<String> string(hs.NewHandle(this));
CharArray* result = CharArray::Alloc(self, GetLength());
- if (result != nullptr) {
- memcpy(result->GetData(), string->GetValue(), string->GetLength() * sizeof(uint16_t));
- } else {
- self->AssertPendingOOMException();
- }
+ memcpy(result->GetData(), string->GetValue(), string->GetLength() * sizeof(uint16_t));
return result;
}