classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] FYI: implemented rest of EventSetDescriptor


From: Mark Wielaard
Subject: Re: [cp-patches] FYI: implemented rest of EventSetDescriptor
Date: Tue, 10 Jan 2006 12:14:30 +0100

Hi Robert,

On Tue, 2006-01-10 at 00:35 +0100, Robert Schuster wrote:
> 2006-01-09  Robert Schuster  <address@hidden>
> 
>         * java/beans/EventSetDescriptor.java: Implemented the two 1.4
>         constructors.
>         (getGetListenerMethod): New method.

Thanks, cool.

A few minor formatting nitpicks.

>  /**
> @@ -94,6 +95,7 @@
>         private Class listenerType;
>         private MethodDescriptor[] listenerMethodDescriptors;
>         private Method[] listenerMethods;
> +    private Method getListenerMethod;

Watch out for tab/space conversion.

+        try
+        {
+          newGetListenerMethod = 
eventSourceClass.getMethod(getListenerMethodName, new Class[] { Class.class });
+        } catch (NoSuchMethodException nsme)
+        {
+          throw (IntrospectionException)

This should be:

  try
    {
       // ...
    }
  catch
    {
      throw ...
    }

> +        // Do no checks if the getListenerMethod is null. 
> +        if (getListenerMethod.getParameterTypes().length != 1
> +            || getListenerMethod.getParameterTypes()[0] != Class.class
> +            || getListenerMethod.getExceptionTypes().length > 0
> +            || !Modifier.isPublic(getListenerMethod.getModifiers()))
> +        throw new IntrospectionException("GetListener method is invalid.");

Again, the throw should be indented 2 positions.

See also http://www.gnu.org/software/classpath/docs/hacking.html#SEC7

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]