< prev index next >

src/java.desktop/macosx/classes/com/apple/laf/AquaUtils.java

Print this page

        

@@ -177,12 +177,12 @@
 
         @Override
         T getInstance() {
             try {
                 ReflectUtil.checkPackageAccess(clazz);
-                return clazz.newInstance();
-            } catch (InstantiationException | IllegalAccessException ignored) {
+                return clazz.getDeclaredConstructor().newInstance();
+            } catch (ReflectiveOperationException ignored) {
             }
             return null;
         }
     }
 
< prev index next >