8068042: Check jdk/src/share/native/sun/misc/URLClassPath.c for JNI pending
Summary: removed unnecessary JNU_ThrowOutOfMemoryError call
Reviewed-by: jiangli, dholmes, iklam
diff --git a/src/share/native/sun/misc/URLClassPath.c b/src/share/native/sun/misc/URLClassPath.c
index 16380c9..e0ad4f8 100644
--- a/src/share/native/sun/misc/URLClassPath.c
+++ b/src/share/native/sun/misc/URLClassPath.c
@@ -52,7 +52,7 @@
clname = getUTF(env, classname, buf, sizeof(buf));
if (clname == NULL) {
- JNU_ThrowOutOfMemoryError(env, NULL);
+ // getUTF() throws OOME before returning NULL, no need to throw OOME here
return result;
}
VerifyFixClassname(clname);
@@ -94,7 +94,7 @@
resname = getUTF(env, resource_name, buf, sizeof(buf));
if (resname == NULL) {
- JNU_ThrowOutOfMemoryError(env, NULL);
+ // getUTF() throws OOME before returning NULL, no need to throw OOME here
return result;
}
result = JVM_GetResourceLookupCache(env, loader, resname);