On Fri, Jun 10, 2005 at 07:43:36PM +0200, Rony G. Flatscher wrote:
> Sure, please find it enclosed.
>
Cool - thanks. My comments are in-line.
> +++ EngineUtils.java 2005-06-07 11:37:28.114998400 +0200
> @@ -1,7 +1,7 @@
> /*
> * The Apache Software License, Version 1.1
> *
> - * Copyright (c) 2004 The Apache Software Foundation. All rights
> + * Copyright (c) 2002 The Apache Software Foundation. All rights
> * reserved.
Yeesh - someone update this for 2005...not something you need to
do - just mentioning it. I'll likely be beat to it.
> - if (args[i] instanceof Number) {
> + if (args[i] instanceof Number)
> + {
> // byte is convertible to all primitive numeric
> types,
> // so this'll find anything in that order and the
> // actual type will be that specified by the method
> decl
Code doesn't match comment - unless I'm mistaken, checking
instanceof Byte won't cover the other numeric types (or a custom
subclass of Number).
> + if (args[i] instanceof Byte) argTypes[i] = byte.class;
> + // 2005-06-08, rgf, *must* be given, or signatures not
> found!
> + else if (args[i] instanceof Short ) argTypes[i] = short.class;
> + else if (args[i] instanceof Integer) argTypes[i] = int.class;
> + else if (args[i] instanceof Long) argTypes[i] = long.class;
> +
> + else if (args[i] instanceof Float) argTypes[i] = float.class;
> + else if (args[i] instanceof Double ) argTypes[i] = double.class;
> + }
> + else if (args[i] instanceof Boolean) argTypes[i] =
> boolean.class;
> + // ---rgf, handle also the case of "Character"
> + else if (args[i] instanceof Character) argTypes[i] = char.class;
OK - I can buy this - except: what about BigDecimal and
BigInteger, and what's the default case (which would handle a
custom subclass of Number)?
> + catch (Exception e3) // 2003-02-23, --rgf, maybe an
> IllegalAccessException?
Just stylistic pedantry: why e3?
Otherwise, I'm happy.
Victor
--
Victor J. Orlikowski <> [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]