changeset 2655:624150627c20

PR2775: JamVM lacks JVM_GetResourceLookupCacheURLs introduced by jdk8u40 2016-03-31 Andrew John Hughes <gnu_andrew@member.fsf.org> PR2775: JamVM lacks JVM_GetResourceLookupCacheURLs introduced by jdk8u40 * Makefile.am: (ICEDTEA_PATCHES): Add PR2775 patch. * NEWS: Updated. 2015-12-22 Xerxes R?nby <xerxes@gudinna.com> PR2775: JamVM lacks JVM_GetResourceLookupCacheURLs introduced by jdk8u40 * patches/jamvm/pr2775-cache_api.patch: Provide a minimal implementation of the lookup cache API which basically says we don't implement it.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Fri, 01 Apr 2016 05:20:52 +0100
parents 55e9ca853da2
children 226896a30232
files ChangeLog Makefile.am NEWS patches/jamvm/pr2775-cache_api.patch
diffstat 4 files changed, 73 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Apr 01 05:04:21 2016 +0100
+++ b/ChangeLog	Fri Apr 01 05:20:52 2016 +0100
@@ -1,3 +1,19 @@
+2016-03-31  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+
+	PR2775: JamVM lacks JVM_GetResourceLookupCacheURLs
+	introduced by jdk8u40
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add PR2775 patch.
+	* NEWS: Updated.
+
+2015-12-22  Xerxes Rånby  <xerxes@gudinna.com>
+
+	PR2775: JamVM lacks JVM_GetResourceLookupCacheURLs
+	introduced by jdk8u40
+	* patches/jamvm/pr2775-cache_api.patch:
+	Provide a minimal implementation of the lookup
+	cache API which basically says we don't implement it.
+
 2016-03-31  Andrew John Hughes  <gnu_andrew@member.fsf.org>
 
 	PR2776: CACAO lacks JVM_GetResourceLookupCacheURLs
--- a/Makefile.am	Fri Apr 01 05:04:21 2016 +0100
+++ b/Makefile.am	Fri Apr 01 05:20:52 2016 +0100
@@ -365,7 +365,8 @@
 ICEDTEA_PATCHES += \
 	patches/jamvm/find_class_from_caller.patch \
 	patches/jamvm/pr2034-tempdir.patch \
-	patches/jamvm/noexecstack.patch
+	patches/jamvm/noexecstack.patch \
+	patches/jamvm/pr2775-cache_api.patch
 endif
 
 if !ENABLE_SUNEC
--- a/NEWS	Fri Apr 01 05:04:21 2016 +0100
+++ b/NEWS	Fri Apr 01 05:20:52 2016 +0100
@@ -193,6 +193,7 @@
   - PR2034: --enable-jamvm builds broken, missing JVM_GetTemporaryDirectory impl
   - PR2336: JamVM lacks JVM_FindClassFromCaller
   - PR2523: Add executable stack markings to callNative.S on JamVM
+  - PR2775: JamVM lacks JVM_GetResourceLookupCacheURLs introduced by jdk8u40
 * CACAO
   - PR1277: Synchronise CACAO rules between IcedTea6/7/8 where possible
   - PR1279: Synchronise CACAO versions between IcedTea6/7/8 where possible
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/jamvm/pr2775-cache_api.patch	Fri Apr 01 05:20:52 2016 +0100
@@ -0,0 +1,54 @@
+commit 25b39703b2c3468f666f6175ff94e46526d402a7
+Author: Xerxes Rånby <xerxes@gudinna.com>
+Date:   Tue Dec 22 13:33:44 2015 +0100
+
+    OpenJDK 8: Add JDK8u JDK-8061651 API. IcedTea PR2775.
+    
+    Implement minimal JVM functionality to tell JDK8u that the JDK-8061651 API is unsupported by JamVM
+    
+    JVM_GetResourceLookupCacheURLs
+    JVM_GetResourceLookupCache
+    JVM_KnownToNotExist
+    
+    Signed-off-by: Xerxes Rånby <xerxes@gudinna.com>
+
+diff --git a/src/classlib/openjdk/jvm.c b/src/classlib/openjdk/jvm.c
+index 971ac75..955621d 100644
+--- jamvm.old/jamvm/src/classlib/openjdk/jvm.c
++++ jamvm/jamvm/src/classlib/openjdk/jvm.c
+@@ -666,6 +666,35 @@ void JVM_SetClassSigners(JNIEnv *env, jclass cls, jobjectArray signers) {
+ }
+ 
+ 
++/* JVM_GetResourceLookupCacheURLs
++   is part of the
++   JDK-8061651 JDK8u API
++*/
++
++jobjectArray JVM_GetResourceLookupCacheURLs(JNIEnv *env, jobject loader) {
++    return NULL; // tell OpenJDK 8 that the lookup cache API is unavailable
++}
++
++/* JVM_GetResourceLookupCache
++   is unused however it is part of the
++   JDK-8061651 JDK8u API
++*/
++
++jintArray JVM_GetResourceLookupCache(JNIEnv *env, jobject loader, const char *resource_name) {
++    UNIMPLEMENTED("JVM_GetResourceLookupCache");
++    return NULL; // tell OpenJDK 8 that the lookup cache is unavailable
++}
++
++/* JVM_KnownToNotExist
++   is unused however it is part of the
++   JDK-8061651 JDK8u API
++*/
++
++jboolean JVM_KnownToNotExist(JNIEnv *env, jobject loader, const char *classname) {
++    UNIMPLEMENTED("JVM_KnownToNotExist");
++    return JNI_FALSE; // tell OpenJDK 8 we don't know whether it exists or not
++}
++
+ /* JVM_GetProtectionDomain */
+ 
+ jobject JVM_GetProtectionDomain(JNIEnv *env, jclass cls) {