6618335: ThreadReference.stop(null) throws NPE instead of InvalidTypeException

Reviewed-by: sla
This commit is contained in:
Erik Gahlin 2014-11-28 16:56:45 +01:00
parent 114dfd5a23
commit f12ce83a25

View File

@ -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 class ThreadReferenceImpl extends ObjectReferenceImpl
}
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);