< prev index next >

src/jdk.jdwp.agent/share/native/libjdwp/inStream.c

Print this page




 241         return NULL;
 242     }
 243     if (!isClass(object)) {
 244         stream->error = JDWP_ERROR(INVALID_CLASS);
 245         return NULL;
 246     }
 247     return object;
 248 }
 249 
 250 jthread
 251 inStream_readThreadRef(JNIEnv *env, PacketInputStream *stream)
 252 {
 253     jobject object = inStream_readObjectRef(env, stream);
 254     if (object == NULL) {
 255         /*
 256          * Could be error or just the null reference. In either case,
 257          * stop now.
 258          */
 259         return NULL;
 260     }
 261     if (!isThread(object)) {
 262         stream->error = JDWP_ERROR(INVALID_THREAD);
 263         return NULL;
 264     }
 265     return object;
 266 }
 267 
 268 jthreadGroup
 269 inStream_readThreadGroupRef(JNIEnv *env, PacketInputStream *stream)
 270 {
 271     jobject object = inStream_readObjectRef(env, stream);
 272     if (object == NULL) {
 273         /*
 274          * Could be error or just the null reference. In either case,
 275          * stop now.
 276          */
 277         return NULL;
 278     }
 279     if (!isThreadGroup(object)) {
 280         stream->error = JDWP_ERROR(INVALID_THREAD_GROUP);
 281         return NULL;




 241         return NULL;
 242     }
 243     if (!isClass(object)) {
 244         stream->error = JDWP_ERROR(INVALID_CLASS);
 245         return NULL;
 246     }
 247     return object;
 248 }
 249 
 250 jthread
 251 inStream_readThreadRef(JNIEnv *env, PacketInputStream *stream)
 252 {
 253     jobject object = inStream_readObjectRef(env, stream);
 254     if (object == NULL) {
 255         /*
 256          * Could be error or just the null reference. In either case,
 257          * stop now.
 258          */
 259         return NULL;
 260     }
 261     if (!isThread(object) && !isFiber(object)) {
 262         stream->error = JDWP_ERROR(INVALID_THREAD);
 263         return NULL;
 264     }
 265     return object;
 266 }
 267 
 268 jthreadGroup
 269 inStream_readThreadGroupRef(JNIEnv *env, PacketInputStream *stream)
 270 {
 271     jobject object = inStream_readObjectRef(env, stream);
 272     if (object == NULL) {
 273         /*
 274          * Could be error or just the null reference. In either case,
 275          * stop now.
 276          */
 277         return NULL;
 278     }
 279     if (!isThreadGroup(object)) {
 280         stream->error = JDWP_ERROR(INVALID_THREAD_GROUP);
 281         return NULL;


< prev index next >