Ooops. �Should have run the unit-tests instead of my own ad-hoc test. �This
patch will work much better at handling null arguments.



Chris Felaco
Principal Software Engineer
Blue Dolphin Group
(508) 358-6758

----- Forwarded by Chris Felaco/Bdg on 07/25/2002 11:39 PM -----
|+---------+---------------------------------------------|
||   Chris |                                             |
||   Felaco|   � � � � To:                               |
||         |   [EMAIL PROTECTED]           |
||   07/25/|   � � � � cc:                               |
||   2002  |   � � � � Subject: � � � �[patch] Possible  |
||   10:15 |   improvement to MethodMap                  |
||   PM    |                                             |
||         |                                             |
|+---------+---------------------------------------------|




I think that this patch improves the readability of the
MethodMap.calcDistance() method, and also will improve the speed. �With
this version, the null check is performed only once, and when the argument
is null, the more expensive isAssignableFrom() check is skipped.
Furthermore, this avoids the second redundant null-check with array
indexing, and the dummy OBJECT variable.

I'll understand if this does not make it into 1.3.1, but perhaps should be
included in 1.4.

<orignal embarassing NPE producing patch deleted>

Chris Felaco
Principal Software Engineer
Blue Dolphin Group
(508) 358-6758

Attachment: =?iso-8859-1?Q?MethodMap=5Fimprovement.patch?=
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to