< prev index next >
src/java.desktop/share/classes/java/beans/PropertyDescriptor.java
Print this page
*** 468,485 ****
if (cls != null && PropertyEditor.class.isAssignableFrom(cls)
&& ReflectUtil.isPackageAccessible(cls)) {
Constructor<?> ctor = null;
if (bean != null) {
try {
! ctor = cls.getConstructor(new Class<?>[] { Object.class });
} catch (Exception ex) {
// Fall through
}
}
try {
if (ctor == null) {
! editor = cls.newInstance();
} else {
editor = ctor.newInstance(new Object[] { bean });
}
} catch (Exception ex) {
// Fall through
--- 468,485 ----
if (cls != null && PropertyEditor.class.isAssignableFrom(cls)
&& ReflectUtil.isPackageAccessible(cls)) {
Constructor<?> ctor = null;
if (bean != null) {
try {
! ctor = cls.getDeclaredConstructor(new Class<?>[] { Object.class });
} catch (Exception ex) {
// Fall through
}
}
try {
if (ctor == null) {
! editor = cls.getDeclaredConstructor().newInstance();
} else {
editor = ctor.newInstance(new Object[] { bean });
}
} catch (Exception ex) {
// Fall through
< prev index next >