< prev index next >
src/jdk.jdi/share/classes/com/sun/tools/jdi/ObjectReferenceImpl.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -345,14 +345,16 @@
void validateIfaceMethodInvocation(Method method, int options)
throws InvalidTypeException,
InvocationException {
/*
- * Only default methods allowed for nonvirtual invokes
+ * For nonvirtual invokes, method must have a body
*/
- if (isNonVirtual(options) && !method.isDefault()) {
- throw new IllegalArgumentException("Not a default method");
+ if (isNonVirtual(options)) {
+ if (method.isAbstract()) {
+ throw new IllegalArgumentException("Abstract method");
+ }
}
}
PacketStream sendInvokeCommand(final ThreadReferenceImpl thread,
final ClassTypeImpl refType,
< prev index next >