2006/10/4, Nathan Beyer <[EMAIL PROTECTED]>:
If this is an event that should be logged, as the TODO indicated, then
why not just print out the stack trace and be done with it? If this
exception happens so often that you'd like it removed, then why would
we want to log a warning message, which I would presume would print to
the console just as frequently.

Logging and printing to console essentially differ in flexible
customization offered by the first approach. An application can have
no console after all.
We develop the common class library here, not an ordinary application
- so let's not assume it will be used in some particular way.

In this concrete case, stack trace is printed every time invalid input
data is supplied - and it is normal for a unit test to cover some
negative cases.
But seeing console jammed with that rubbish is quite confusing (for me
at least). OTOH, such info would be valuable for app developer - so
why not satisfy both?


As for TODOs, in general I find TODOs never get done, especially
trivial ones like this particular case.
Because we have more priority tasks to be done. We just haven't
reached that stage of completeness, when we can afford minor refining
and polishing. Never say never, you know :)

Please, announce ahead if you do such things in future.

--
Regards,
Alexey


-Nathan

On 10/3/06, Alexey Varlamov <[EMAIL PROTECTED]> wrote:
> Nathan,
>
> I've seen you dropped many TODOs in "- Code cleanup -" series of commits;
> I'd like to know what reasoning was behind this? I think it's a bit
> early to erase TODOs without appropriate consideration...
>
> In particular, could you please undo the following change, it produces
> garbage messages during AUTH testing:
>
> 
modules/auth/src/main/java/common/org/apache/harmony/auth/login/DefaultConfigurationParser.java
> ===========
> @@ -216,12 +206,12 @@ public class DefaultConfigurationParser
> try {
> val = PolicyUtils.expand(st.sval, system);
> } catch (Exception e) {
> - //TODO: warning log
> - }
> + e.printStackTrace();
> + }
> }
>
> --
> WBR,
> Alexey
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to