changeset 259:064eb636dbea

Handle the stricter access control tests enforced by JDK 9, trying to load the privileged class.
author shade
date Thu, 19 May 2016 14:15:43 +0300
parents 90d6ad22e6c9
children c0db37918128
files jcstress-core/src/main/java/org/openjdk/jcstress/util/Reflections.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/Reflections.java	Mon May 16 20:51:59 2016 +0300
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/Reflections.java	Thu May 19 14:15:43 2016 +0300
@@ -70,6 +70,8 @@
                 newClasses.add(Class.forName(name));
             } catch (ClassNotFoundException e) {
                 throw new IllegalStateException(e.getMessage(), e);
+            } catch (NoClassDefFoundError e) {
+                // may happen in JDK 9+ while trying to load a privileged class
             }
         }
         return newClasses;