harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject [classlib][beans] FYI backing out some changes
Date Thu, 02 Aug 2007 01:58:46 GMT
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();
> 
> 
> 

Mime
View raw message