jdk/src/jdk.jdwp.agent/share/native/libjdwp/ModuleReferenceImpl.c
changeset 44545 83b611b88ac8
parent 42338 a60f280f803c
child 47021 9f639c395a14
equal deleted inserted replaced
44480:2c33418a6d57 44545:83b611b88ac8
    27 #include "inStream.h"
    27 #include "inStream.h"
    28 #include "outStream.h"
    28 #include "outStream.h"
    29 #include "ModuleReferenceImpl.h"
    29 #include "ModuleReferenceImpl.h"
    30 
    30 
    31 
    31 
    32 static jclass jlrM(JNIEnv *env) {
    32 static jclass jlM(JNIEnv *env) {
    33     return findClass(env, "Ljava/lang/reflect/Module;");
    33     return findClass(env, "Ljava/lang/Module;");
    34 }
    34 }
    35 
    35 
    36 static jboolean
    36 static jboolean
    37 getName(PacketInputStream *in, PacketOutputStream *out)
    37 getName(PacketInputStream *in, PacketOutputStream *out)
    38 {
    38 {
    41     char *name = NULL;
    41     char *name = NULL;
    42     jstring namestr;
    42     jstring namestr;
    43     jobject module;
    43     jobject module;
    44 
    44 
    45     if (method == NULL) {
    45     if (method == NULL) {
    46         method = getMethod(env, jlrM(env), "getName", "()Ljava/lang/String;");
    46         method = getMethod(env, jlM(env), "getName", "()Ljava/lang/String;");
    47     }
    47     }
    48     module = inStream_readModuleRef(getEnv(), in);
    48     module = inStream_readModuleRef(getEnv(), in);
    49     if (inStream_error(in)) {
    49     if (inStream_error(in)) {
    50         return JNI_TRUE;
    50         return JNI_TRUE;
    51     }
    51     }
    69     JNIEnv *env = getEnv();
    69     JNIEnv *env = getEnv();
    70     jobject loader;
    70     jobject loader;
    71     jobject module;
    71     jobject module;
    72 
    72 
    73     if (method == NULL) {
    73     if (method == NULL) {
    74         method = getMethod(env, jlrM(env), "getClassLoader", "()Ljava/lang/ClassLoader;");
    74         method = getMethod(env, jlM(env), "getClassLoader", "()Ljava/lang/ClassLoader;");
    75     }
    75     }
    76     module = inStream_readModuleRef(env, in);
    76     module = inStream_readModuleRef(env, in);
    77     if (inStream_error(in)) {
    77     if (inStream_error(in)) {
    78         return JNI_TRUE;
    78         return JNI_TRUE;
    79     }
    79     }