1.1 --- a/json-beans/src/main/java/net/java/html/beans/JSONBeans.java Sun Aug 03 21:35:36 2014 +0200
1.2 +++ b/json-beans/src/main/java/net/java/html/beans/JSONBeans.java Sun Aug 03 21:48:48 2014 +0200
1.3 @@ -71,21 +71,14 @@
1.4 BeanInfo bi = Introspector.getBeanInfo(javaBeanClass);
1.5 Method addPCL;
1.6 try {
1.7 - addPCL = javaBeanClass.getMethod("addPropertyChangeListener", PropertyChangeListener.class);
1.8 + addPCL = javaBeanClass.getMethod("addPropertyChangeListener", PropertyChangeListener.class); // NOI18N
1.9 } catch (NoSuchMethodException ex) {
1.10 addPCL = null;
1.11 }
1.12 - Method removePCL;
1.13 - try {
1.14 - removePCL = javaBeanClass.getMethod("removePropertyChangeListener", PropertyChangeListener.class);
1.15 - } catch (NoSuchMethodException ex) {
1.16 - removePCL = null;
1.17 - }
1.18 Html4JavaType html4JavaType = new Html4JavaType(javaBeanClass,
1.19 bi.getPropertyDescriptors(),
1.20 bi.getMethodDescriptors(),
1.21 - removePCL != null ? addPCL : null,
1.22 - addPCL != null ? removePCL : null
1.23 + addPCL
1.24 );
1.25 }
1.26
1.27 @@ -100,13 +93,12 @@
1.28 private final PropertyDescriptor[] properties;
1.29 private final MethodDescriptor[] methods;
1.30 private final Method addPCL;
1.31 - private final Method removePCL;
1.32
1.33 Html4JavaType(
1.34 Class<?> javaBeanClass,
1.35 PropertyDescriptor[] pd,
1.36 MethodDescriptor[] md,
1.37 - Method addPCL, Method removePCL
1.38 + Method addPCL
1.39 ) {
1.40 super(javaBeanClass, javaBeanClass, pd.length, md.length);
1.41 this.properties = pd;
1.42 @@ -118,7 +110,6 @@
1.43 registerFunction(md[i].getName(), i);
1.44 }
1.45 this.addPCL = addPCL;
1.46 - this.removePCL = removePCL;
1.47 }
1.48
1.49 @Override