< prev index next >
src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java
Print this page
@@ -1129,20 +1129,16 @@
try {
Class<?> c = Class.forName(className, true,Thread.currentThread().
getContextClassLoader());
if (methodName == null) {
- return c.newInstance();
+ return c.getDeclaredConstructor().newInstance();
}
Method m = c.getMethod(methodName, (Class<?>[])null);
return m.invoke(c, (Object[])null);
- } catch (ClassNotFoundException cnfe) {
- } catch (IllegalAccessException iae) {
- } catch (InvocationTargetException ite) {
- } catch (NoSuchMethodException nsme) {
- } catch (InstantiationException ie) {
+ } catch (ReflectiveOperationException e) {
}
return null;
}
}
< prev index next >