[vmkit-commits] [PATCH] Impl JVM_IsSupportedJNIVersion, claim we support all known JNI versions.

Will Dietz wdietz2 at illinois.edu
Thu Nov 3 07:30:58 PDT 2011


Inlined below.

Possibly better than a simple "return true" in that we don't claim to
support JNI versions that are invalid or don't exist yet :).

~Will

>From 5064cafd6be7fd9987323d8b0604e25784488e70 Mon Sep 17 00:00:00 2001
From: Will Dietz <w at wdtz.org>
Date: Wed, 2 Nov 2011 22:31:14 -0500
Subject: [PATCH 10/17] Impl JVM_IsSupportedJNIVersion, claim we support all
 known JNI versions.

---
 lib/J3/ClassLib/OpenJDK/OpenJDK.inc |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lib/J3/ClassLib/OpenJDK/OpenJDK.inc
b/lib/J3/ClassLib/OpenJDK/OpenJDK.inc
index 31ea42d..fd7f450 100644
--- a/lib/J3/ClassLib/OpenJDK/OpenJDK.inc
+++ b/lib/J3/ClassLib/OpenJDK/OpenJDK.inc
@@ -429,7 +429,10 @@ JVM_FindLibraryEntry(void *handle, const char *name) {

 JNIEXPORT jboolean JNICALL
 JVM_IsSupportedJNIVersion(jint version) {
-  NYI();
+  return version == JNI_VERSION_1_1 ||
+         version == JNI_VERSION_1_2 ||
+         version == JNI_VERSION_1_4 |
+         version == JNI_VERSION_1_6;
 }

 /*
-- 
1.7.5.1



More information about the vmkit-commits mailing list