6618335: ThreadReference.stop(null) throws NPE instead of InvalidTypeException
authoregahlin
Fri, 28 Nov 2014 16:56:45 +0100
changeset 28097 fa1a96810647
parent 28096 aba953547743
child 28098 fbc3debb3d50
6618335: ThreadReference.stop(null) throws NPE instead of InvalidTypeException Reviewed-by: sla
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java	Wed Nov 26 23:49:02 2014 +0000
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java	Fri Nov 28 16:56:45 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -238,7 +238,7 @@
     }
 
     public void stop(ObjectReference throwable) throws InvalidTypeException {
-        validateMirror(throwable);
+        validateMirrorOrNull(throwable);
         // Verify that the given object is a Throwable instance
         List<ReferenceType> list = vm.classesByName("java.lang.Throwable");
         ClassTypeImpl throwableClass = (ClassTypeImpl)list.get(0);