On Aug 5, 2008, at 5:22 PM, Paul Smith wrote:

I was trying to preserve the external behavior that would occur with the old code if you did not provide jmxtools.jar at runtime. As implemented, both the new code and the old code would result in a NoClassDefFoundError if it was deployed without jmxtools.jar. However, the likelihood that some client code out there has something like:


try {
  new Agent().start();
} catch (NoClassDefFoundError ex) {
}

is vanishingly small, so switching to a RuntimeException is not a big issue to me. I'd prefer not to revert the whole change, but to change the Error constructors to RuntimeException constructors which I'll do and see what you think.


Yes, thanks, although I _wish_ we could use this slightly different pattern instead (as I'm sure you probably agree):

throw new RuntimeException("Failure starting... ", e);

except it needs 1.4 source compatibility.  *sigh*.  bummer.


Didn't notice that, will need to change those to new RuntimeException(ex.toString())'s.


One other note on the commit, I notice the addition of JavaDoc comments on things like no-arg constructors. I'm -0 on adding JavaDoc that adds no value at all ("create new instance"), that really gets under my goat here at work it just seems pointless, a waste of effort and makes the code actually harder to read if you ask me. Simple clean code that is self-explanatory should be the goal IMHO.

Paul



I was introducing some new methods that warranted Javadocs and their was no class Javadoc, the others were just for completeness. A lot of tools, code checkers, etc will complain unless everything is doc'd. I agree that that can be a bit silly, but it is better than the alternative of complete lack of documentation comments.

May need to get into the issue for log4j 2.0, but don't think it would be productive at the moment. If you want to save it for later, file a log4j 2.0 JIRA for establishing javadoc standards or something like that and will get to it when it becomes more relevant.

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

Reply via email to