Tom Tromey wrote:
>
> Eric> if (str == null || (len = str.length()) == 0)
> Eric> if (Configuration.EXCEPTION_MESSAGES)
> Eric> throw new NumberFormatException("string null or empty");
> Eric> else
> Eric> throw new NumberFormatException();
>
> My concerns with this approach are maintainability and readability. I
> wish it were easily possible to do this via some sort of preprocessing
> step.
There's always:
throw Configuration.EXCEPTION_MESSAGES ?
new NumberFormatException("string null or empty") :
new NumberFormatException();
This is, I think, slightly more readable - although I've always been a
fan of the ternary operator, so I'm biased perhaps.
Stuart.
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath