提交 85f4c97e 编写于 作者: D dbuck

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

Reviewed-by: sla
上级 47d1d89b
/* /*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -238,7 +238,7 @@ public class ThreadReferenceImpl extends ObjectReferenceImpl ...@@ -238,7 +238,7 @@ public class ThreadReferenceImpl extends ObjectReferenceImpl
} }
public void stop(ObjectReference throwable) throws InvalidTypeException { public void stop(ObjectReference throwable) throws InvalidTypeException {
validateMirror(throwable); validateMirrorOrNull(throwable);
// Verify that the given object is a Throwable instance // Verify that the given object is a Throwable instance
List<ReferenceType> list = vm.classesByName("java.lang.Throwable"); List<ReferenceType> list = vm.classesByName("java.lang.Throwable");
ClassTypeImpl throwableClass = (ClassTypeImpl)list.get(0); ClassTypeImpl throwableClass = (ClassTypeImpl)list.get(0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册