[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: implemented rest of EventSetDescriptor
From: |
Robert Schuster |
Subject: |
Re: [cp-patches] FYI: implemented rest of EventSetDescriptor |
Date: |
Tue, 10 Jan 2006 12:31:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.12) Gecko/20051208 |
Hi Mark,
something is wrong with the overal formatting of this class anyway. I'll fix
this.
cya
Robert
Mark Wielaard wrote:
> 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
signature.asc
Description: OpenPGP digital signature