changeset 8014:af1b08ff48ae

8023464: test/closed/sun/tracing/ProviderProxyTest.java failing Summary: Don't rely on assertions when an Exception suits better Reviewed-by: alanb, dfuchs, sjiang
author jbachorik
date Thu, 05 Sep 2013 13:04:17 +0200
parents bd6fcc5eebb8
children 9522b5e836d3
files src/share/classes/sun/tracing/ProviderSkeleton.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/tracing/ProviderSkeleton.java	Wed Sep 04 19:47:26 2013 -0700
+++ b/src/share/classes/sun/tracing/ProviderSkeleton.java	Thu Sep 05 13:04:17 2013 +0200
@@ -164,7 +164,10 @@
                     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;