< prev index next >
src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java
Print this page
*** 1129,1148 ****
try {
Class<?> c = Class.forName(className, true,Thread.currentThread().
getContextClassLoader());
if (methodName == null) {
! return c.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) {
}
return null;
}
}
--- 1129,1144 ----
try {
Class<?> c = Class.forName(className, true,Thread.currentThread().
getContextClassLoader());
if (methodName == null) {
! return c.getDeclaredConstructor().newInstance();
}
Method m = c.getMethod(methodName, (Class<?>[])null);
return m.invoke(c, (Object[])null);
! } catch (ReflectiveOperationException e) {
}
return null;
}
}
< prev index next >