Steve Loughran wrote:
[EMAIL PROTECTED] wrote:
jkf 2005/05/23 14:52:35
Modified: src/main/org/apache/tools/ant/taskdefs/email
EmailTask.java
src/main/org/apache/tools/ant Main.java
src/main/org/apache/tools/ant/taskdefs/optional/javah
JavahAdapterFactory.java
src/main/org/apache/tools/ant/listener MailLogger.java
src/main/org/apache/tools/ant/taskdefs/optional/script
ScriptDef.java
src/main/org/apache/tools/ant/util ClasspathUtils.java
src/main/org/apache/tools/ant/taskdefs/rmic
RmicAdapterFactory.java
src/main/org/apache/tools/ant/taskdefs/optional/native2ascii
Native2AsciiAdapterFactory.java
src/main/org/apache/tools/ant/util/regexp
RegexpMatcherFactory.java
src/main/org/apache/tools/ant/taskdefs/compilers
CompilerAdapterFactory.java
Log:
Improved the newInstance method in ClasspathUtils, and used this
method from
the places where newInstances are made and Throwable is caught.
nice bit of refactoring.
Does this change how the ProjectHelper diagnostics stuff works, or is
that self-contained enough to be unaffected.
Unless some unexpected throwable (unexpected RuntimeException or Error)
was actually thrown while creating the class, nothing outside the
changed scope should notice anything (apart from some error strings in
output in case the class could not be created). For this even the
LinkageError is considered expected in this situation. (Wherever a
buildexception was thrown, a buildexeception is still thrown, in case of
logging still only logging applies.)
If for instance an VirtualMachineError / ThreadDeath occurs however
things may go different. (If no layer above catches the Error though.)
Ideally those would leak all the way up, at least when thrown so that
appropriate action can be taken by the VM (in case of a
VirualMachineError exit, printing an error report).
Currently those errors are sometime caught and converted to
buildexceptions (Sometimes making clear OutOfMemoryErrors
incomprehensible (e.g. 25086)) And sometimes not (e.g. 34342)
See also discussion in 32941 (only party solved).
So currently I am looking into getting as many catch Throwables out as
possible, in small steps.
Martijn
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]