diff options
Diffstat (limited to 'runtime/native/java_lang_System.cc')
-rw-r--r-- | runtime/native/java_lang_System.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/runtime/native/java_lang_System.cc b/runtime/native/java_lang_System.cc index f79be56..736b42b 100644 --- a/runtime/native/java_lang_System.cc +++ b/runtime/native/java_lang_System.cc @@ -39,8 +39,7 @@ static void ThrowArrayStoreException_NotAnArray(const char* identifier, mirror:: SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { std::string actualType(PrettyTypeOf(array)); Thread* self = Thread::Current(); - ThrowLocation throw_location = self->GetCurrentLocationForThrow(); - self->ThrowNewExceptionF(throw_location, "Ljava/lang/ArrayStoreException;", + self->ThrowNewExceptionF("Ljava/lang/ArrayStoreException;", "%s of type %s is not an array", identifier, actualType.c_str()); } @@ -52,11 +51,11 @@ static void System_arraycopy(JNIEnv* env, jclass, jobject javaSrc, jint srcPos, // Null pointer checks. if (UNLIKELY(javaSrc == nullptr)) { - ThrowNullPointerException(nullptr, "src == null"); + ThrowNullPointerException("src == null"); return; } if (UNLIKELY(javaDst == nullptr)) { - ThrowNullPointerException(nullptr, "dst == null"); + ThrowNullPointerException("dst == null"); return; } @@ -78,8 +77,7 @@ static void System_arraycopy(JNIEnv* env, jclass, jobject javaSrc, jint srcPos, if (UNLIKELY(srcPos < 0) || UNLIKELY(dstPos < 0) || UNLIKELY(count < 0) || UNLIKELY(srcPos > srcArray->GetLength() - count) || UNLIKELY(dstPos > dstArray->GetLength() - count)) { - ThrowLocation throw_location = soa.Self()->GetCurrentLocationForThrow(); - soa.Self()->ThrowNewExceptionF(throw_location, "Ljava/lang/ArrayIndexOutOfBoundsException;", + soa.Self()->ThrowNewExceptionF("Ljava/lang/ArrayIndexOutOfBoundsException;", "src.length=%d srcPos=%d dst.length=%d dstPos=%d length=%d", srcArray->GetLength(), srcPos, dstArray->GetLength(), dstPos, count); @@ -132,8 +130,7 @@ static void System_arraycopy(JNIEnv* env, jclass, jobject javaSrc, jint srcPos, srcComponentType->IsPrimitive())) { std::string srcType(PrettyTypeOf(srcArray)); std::string dstType(PrettyTypeOf(dstArray)); - ThrowLocation throw_location = soa.Self()->GetCurrentLocationForThrow(); - soa.Self()->ThrowNewExceptionF(throw_location, "Ljava/lang/ArrayStoreException;", + soa.Self()->ThrowNewExceptionF("Ljava/lang/ArrayStoreException;", "Incompatible types: src=%s, dst=%s", srcType.c_str(), dstType.c_str()); return; |