summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2009-09-17 11:33:21 -0700
committerElliott Hughes <enh@google.com>2009-09-17 11:33:21 -0700
commit973ff882e7ef42fdbf43b94814828ec723685507 (patch)
tree314644b372d047b9e87003f0419c9a1c3463f0e8
parent77d58e2a1577a4992f4d81e9ca2807f7533725c6 (diff)
downloadlibcore-973ff882e7ef42fdbf43b94814828ec723685507.zip
libcore-973ff882e7ef42fdbf43b94814828ec723685507.tar.gz
libcore-973ff882e7ef42fdbf43b94814828ec723685507.tar.bz2
Don't throw OutOfMemoryError if it's already been thrown.
If GetPrimitiveArrayCritical fails, it throws a suitable exception for us. Also remove dead code.
-rw-r--r--archive/src/main/native/java_util_zip_Deflater.c1
-rw-r--r--openssl/src/main/native/BNInterface.c6
2 files changed, 0 insertions, 7 deletions
diff --git a/archive/src/main/native/java_util_zip_Deflater.c b/archive/src/main/native/java_util_zip_Deflater.c
index 47347e6..af0bfcc 100644
--- a/archive/src/main/native/java_util_zip_Deflater.c
+++ b/archive/src/main/native/java_util_zip_Deflater.c
@@ -199,7 +199,6 @@ Java_java_util_zip_Deflater_deflateImpl (JNIEnv * env, jobject recv,
sout = stream->stream->total_out;
out = ((*env)->GetPrimitiveArrayCritical (env, buf, 0));
if (out == NULL) {
- throwNewOutOfMemoryError(env, "");
return -1;
}
stream->stream->next_out = (Bytef *) out + off;
diff --git a/openssl/src/main/native/BNInterface.c b/openssl/src/main/native/BNInterface.c
index 755a93b..1a3eb16 100644
--- a/openssl/src/main/native/BNInterface.c
+++ b/openssl/src/main/native/BNInterface.c
@@ -33,12 +33,6 @@
static void
-throwOutOfMemoryException(JNIEnv* env, const char* message)
-{
- jniThrowException(env, "java/lang/OutOfMemoryError", message);
-}
-
-static void
throwNewNullPointerException (JNIEnv* env, const char* message)
{
jniThrowException(env, "java/lang/NullPointerException", message);