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