mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8177530: Module system implementation refresh (4/2017)
Co-authored-by: Harold Seigel <harold.seigel@oracle.com> Co-authored-by: Mandy Chung <mandy.chung@oracle.com> Reviewed-by: lfoltan, sspitsyn
This commit is contained in:
parent
4ffa7d7bfc
commit
a3ab143c64
90 changed files with 477 additions and 464 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -47,7 +47,7 @@ extern "C" {
|
|||
#define FAILED 2
|
||||
|
||||
static const char *EXC_CNAME = "java/lang/Exception";
|
||||
static const char* MOD_CNAME = "Ljava/lang/reflect/Module;";
|
||||
static const char* MOD_CNAME = "Ljava/lang/Module;";
|
||||
|
||||
static jvmtiEnv *jvmti = NULL;
|
||||
static jint result = PASSED;
|
||||
|
@ -96,7 +96,7 @@ void throw_exc(JNIEnv *env, char *msg) {
|
|||
}
|
||||
|
||||
static
|
||||
jclass jlrM(JNIEnv *env) {
|
||||
jclass jlM(JNIEnv *env) {
|
||||
jclass cls = NULL;
|
||||
|
||||
cls = JNI_ENV_PTR(env)->FindClass(JNI_ENV_ARG(env, MOD_CNAME));
|
||||
|
@ -123,8 +123,8 @@ jboolean can_module_read(JNIEnv *env, jobject module, jobject to_module) {
|
|||
jboolean res = JNI_FALSE;
|
||||
|
||||
if (mCanRead == NULL) {
|
||||
const char* sign = "(Ljava/lang/reflect/Module;)Z";
|
||||
mCanRead = get_method(env, jlrM(env), "canRead", sign);
|
||||
const char* sign = "(Ljava/lang/Module;)Z";
|
||||
mCanRead = get_method(env, jlM(env), "canRead", sign);
|
||||
}
|
||||
res = JNI_ENV_PTR(env)->CallBooleanMethod(JNI_ENV_ARG(env, module),
|
||||
mCanRead, to_module);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue