8023464: test/closed/sun/tracing/ProviderProxyTest.java failing

Don't rely on assertions when an Exception suits better

Reviewed-by: alanb, dfuchs, sjiang
This commit is contained in:
Jaroslav Bachorik 2013-09-05 13:04:17 +02:00
parent b5cd24ccc9
commit 02d81bbc68

View File

@ -164,7 +164,10 @@ public abstract class ProviderSkeleton implements InvocationHandler, Provider {
declaringClass == Object.class) {
return method.invoke(this, args);
} else {
assert false;
// assert false : "this should never happen"
// reaching here would indicate a breach
// in security in the higher layers
throw new SecurityException();
}
} catch (IllegalAccessException e) {
assert false;