You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2007/08/01 18:37:24 UTC
svn commit: r561865 - in
/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans:
BeanInfoImpl.java EventSetDescriptor.java StandardBeanInfo.java
Author: tellison
Date: Wed Aug 1 09:37:16 2007
New Revision: 561865
URL: http://svn.apache.org/viewvc?view=rev&rev=561865
Log:
Restore throws declaration on EventSetDescriptor constructors, as required by spec. (second attempt)
Modified:
harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java
Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java?view=diff&rev=561865&r1=561864&r2=561865
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java (original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java Wed Aug 1 09:37:16 2007
@@ -250,13 +250,18 @@
// in event set descriptor pattern
}
- listenerCoreName = Introspector
- .decapitalize(listenerCoreName);
- EventSetDescriptor esd = new EventSetDescriptor(
- listenerCoreName, listenerType,
- listenerMethods, addListenerMethod,
- removeListenerMethod, getListenerMethod);
- result.put(listenerCoreName, esd);
+ try {
+ listenerCoreName = Introspector
+ .decapitalize(listenerCoreName);
+ EventSetDescriptor esd = new EventSetDescriptor(
+ listenerCoreName, listenerType,
+ listenerMethods, addListenerMethod,
+ removeListenerMethod, getListenerMethod);
+ result.put(listenerCoreName, esd);
+ } catch (IntrospectionException ie) {
+ System.out.println(Messages.getString(
+ "beans.39", listenerCoreName)); //$NON-NLS-1$
+ }
} // if length of parameters list equals to 1
} // if no descriptors for given listener name yet
Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java?view=diff&rev=561865&r1=561864&r2=561865
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java (original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java Wed Aug 1 09:37:16 2007
@@ -131,14 +131,16 @@
public EventSetDescriptor(String eventSetName, Class<?> listenerType,
Method[] listenerMethods, Method addListenerMethod,
- Method removeListenerMethod) {
+ Method removeListenerMethod) throws IntrospectionException {
+
this(eventSetName, listenerType, listenerMethods, addListenerMethod,
removeListenerMethod, null);
}
public EventSetDescriptor(String eventSetName, Class<?> listenerType,
Method[] listenerMethods, Method addListenerMethod,
- Method removeListenerMethod, Method getListenerMethod) {
+ Method removeListenerMethod, Method getListenerMethod)
+ throws IntrospectionException {
setName(eventSetName);
this.listenerType = listenerType;
@@ -165,7 +167,9 @@
public EventSetDescriptor(String eventSetName, Class<?> listenerType,
MethodDescriptor[] listenerMethodDescriptors,
- Method addListenerMethod, Method removeListenerMethod) {
+ Method addListenerMethod, Method removeListenerMethod)
+ throws IntrospectionException {
+
this(eventSetName, listenerType, null, addListenerMethod,
removeListenerMethod, null);
Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java?view=diff&rev=561865&r1=561864&r2=561865
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java (original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java Wed Aug 1 09:37:16 2007
@@ -823,7 +823,7 @@
* @throws IntrospectionException
*/
@SuppressWarnings("unchecked")
- private EventSetDescriptor[] introspectEvents() {
+ private EventSetDescriptor[] introspectEvents() throws IntrospectionException {
// Get descriptors for the public methods
// FIXME: performance
MethodDescriptor[] theMethods = introspectMethods();
Re: [classlib][beans] FYI backing out some changes
Posted by Tony Wu <wu...@gmail.com>.
Hi Tim,
I agree on this change. Thanks.
On 8/2/07, Tim Ellison <t....@gmail.com> wrote:
> Tony,
>
> FYI I backed out some of the refactoring that you did since it changed
> the public constructor signatures in EventSetDescriptor. You might want
> to check that you agree with what I did.
>
> Regards,
> Tim
>
> tellison@apache.org wrote:
> > Author: tellison
> > Date: Wed Aug 1 09:37:16 2007
> > New Revision: 561865
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=561865
> > Log:
> > Restore throws declaration on EventSetDescriptor constructors, as required by spec. (second attempt)
> >
> > Modified:
> > harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
> > harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
> > harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java
> >
> > Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
> > URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java?view=diff&rev=561865&r1=561864&r2=561865
> > ==============================================================================
> > --- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java (original)
> > +++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java Wed Aug 1 09:37:16 2007
> > @@ -250,13 +250,18 @@
> > // in event set descriptor pattern
> > }
> >
> > - listenerCoreName = Introspector
> > - .decapitalize(listenerCoreName);
> > - EventSetDescriptor esd = new EventSetDescriptor(
> > - listenerCoreName, listenerType,
> > - listenerMethods, addListenerMethod,
> > - removeListenerMethod, getListenerMethod);
> > - result.put(listenerCoreName, esd);
> > + try {
> > + listenerCoreName = Introspector
> > + .decapitalize(listenerCoreName);
> > + EventSetDescriptor esd = new EventSetDescriptor(
> > + listenerCoreName, listenerType,
> > + listenerMethods, addListenerMethod,
> > + removeListenerMethod, getListenerMethod);
> > + result.put(listenerCoreName, esd);
> > + } catch (IntrospectionException ie) {
> > + System.out.println(Messages.getString(
> > + "beans.39", listenerCoreName)); //$NON-NLS-1$
> > + }
> >
> > } // if length of parameters list equals to 1
> > } // if no descriptors for given listener name yet
> >
> > Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
> > URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java?view=diff&rev=561865&r1=561864&r2=561865
> > ==============================================================================
> > --- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java (original)
> > +++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java Wed Aug 1 09:37:16 2007
> > @@ -131,14 +131,16 @@
> >
> > public EventSetDescriptor(String eventSetName, Class<?> listenerType,
> > Method[] listenerMethods, Method addListenerMethod,
> > - Method removeListenerMethod) {
> > + Method removeListenerMethod) throws IntrospectionException {
> > +
> > this(eventSetName, listenerType, listenerMethods, addListenerMethod,
> > removeListenerMethod, null);
> > }
> >
> > public EventSetDescriptor(String eventSetName, Class<?> listenerType,
> > Method[] listenerMethods, Method addListenerMethod,
> > - Method removeListenerMethod, Method getListenerMethod) {
> > + Method removeListenerMethod, Method getListenerMethod)
> > + throws IntrospectionException {
> >
> > setName(eventSetName);
> > this.listenerType = listenerType;
> > @@ -165,7 +167,9 @@
> >
> > public EventSetDescriptor(String eventSetName, Class<?> listenerType,
> > MethodDescriptor[] listenerMethodDescriptors,
> > - Method addListenerMethod, Method removeListenerMethod) {
> > + Method addListenerMethod, Method removeListenerMethod)
> > + throws IntrospectionException {
> > +
> > this(eventSetName, listenerType, null, addListenerMethod,
> > removeListenerMethod, null);
> >
> >
> > Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java
> > URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java?view=diff&rev=561865&r1=561864&r2=561865
> > ==============================================================================
> > --- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java (original)
> > +++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java Wed Aug 1 09:37:16 2007
> > @@ -823,7 +823,7 @@
> > * @throws IntrospectionException
> > */
> > @SuppressWarnings("unchecked")
> > - private EventSetDescriptor[] introspectEvents() {
> > + private EventSetDescriptor[] introspectEvents() throws IntrospectionException {
> > // Get descriptors for the public methods
> > // FIXME: performance
> > MethodDescriptor[] theMethods = introspectMethods();
> >
> >
> >
>
--
Tony Wu
China Software Development Lab, IBM
[classlib][beans] FYI backing out some changes
Posted by Tim Ellison <t....@gmail.com>.
Tony,
FYI I backed out some of the refactoring that you did since it changed
the public constructor signatures in EventSetDescriptor. You might want
to check that you agree with what I did.
Regards,
Tim
tellison@apache.org wrote:
> Author: tellison
> Date: Wed Aug 1 09:37:16 2007
> New Revision: 561865
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=561865
> Log:
> Restore throws declaration on EventSetDescriptor constructors, as required by spec. (second attempt)
>
> Modified:
> harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
> harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
> harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java
>
> Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java?view=diff&rev=561865&r1=561864&r2=561865
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java (original)
> +++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java Wed Aug 1 09:37:16 2007
> @@ -250,13 +250,18 @@
> // in event set descriptor pattern
> }
>
> - listenerCoreName = Introspector
> - .decapitalize(listenerCoreName);
> - EventSetDescriptor esd = new EventSetDescriptor(
> - listenerCoreName, listenerType,
> - listenerMethods, addListenerMethod,
> - removeListenerMethod, getListenerMethod);
> - result.put(listenerCoreName, esd);
> + try {
> + listenerCoreName = Introspector
> + .decapitalize(listenerCoreName);
> + EventSetDescriptor esd = new EventSetDescriptor(
> + listenerCoreName, listenerType,
> + listenerMethods, addListenerMethod,
> + removeListenerMethod, getListenerMethod);
> + result.put(listenerCoreName, esd);
> + } catch (IntrospectionException ie) {
> + System.out.println(Messages.getString(
> + "beans.39", listenerCoreName)); //$NON-NLS-1$
> + }
>
> } // if length of parameters list equals to 1
> } // if no descriptors for given listener name yet
>
> Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java?view=diff&rev=561865&r1=561864&r2=561865
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java (original)
> +++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java Wed Aug 1 09:37:16 2007
> @@ -131,14 +131,16 @@
>
> public EventSetDescriptor(String eventSetName, Class<?> listenerType,
> Method[] listenerMethods, Method addListenerMethod,
> - Method removeListenerMethod) {
> + Method removeListenerMethod) throws IntrospectionException {
> +
> this(eventSetName, listenerType, listenerMethods, addListenerMethod,
> removeListenerMethod, null);
> }
>
> public EventSetDescriptor(String eventSetName, Class<?> listenerType,
> Method[] listenerMethods, Method addListenerMethod,
> - Method removeListenerMethod, Method getListenerMethod) {
> + Method removeListenerMethod, Method getListenerMethod)
> + throws IntrospectionException {
>
> setName(eventSetName);
> this.listenerType = listenerType;
> @@ -165,7 +167,9 @@
>
> public EventSetDescriptor(String eventSetName, Class<?> listenerType,
> MethodDescriptor[] listenerMethodDescriptors,
> - Method addListenerMethod, Method removeListenerMethod) {
> + Method addListenerMethod, Method removeListenerMethod)
> + throws IntrospectionException {
> +
> this(eventSetName, listenerType, null, addListenerMethod,
> removeListenerMethod, null);
>
>
> Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java?view=diff&rev=561865&r1=561864&r2=561865
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java (original)
> +++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/StandardBeanInfo.java Wed Aug 1 09:37:16 2007
> @@ -823,7 +823,7 @@
> * @throws IntrospectionException
> */
> @SuppressWarnings("unchecked")
> - private EventSetDescriptor[] introspectEvents() {
> + private EventSetDescriptor[] introspectEvents() throws IntrospectionException {
> // Get descriptors for the public methods
> // FIXME: performance
> MethodDescriptor[] theMethods = introspectMethods();
>
>
>