summaryrefslogtreecommitdiff
path: root/debian/patches/pr2775-cache_api.diff
blob: 4d79d12945b78b2c001cb1139197d70e9da5caab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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) {