https://issues.apache.org/bugzilla/show_bug.cgi?id=45039





--- Comment #1 from Thorbjørn Ravn Andersen <[EMAIL PROTECTED]>  2008-07-02 
17:25:46 PST ---
(In reply to comment #0)

> JDK 1.4 added Throwable.getStackTrace() to provide direct access to this info,
> but since log4j still supports running on earlier platforms it can not depend
> on the availability of this method.  Building log4j does require at least a 
> JDK
> 1.4 due to the use of Maven, so it could have explicit calls to
> Throwable.getStackTrace() as long as it was prepared to catch an exception if
> the method was not found and would fallback to the JDK 1.3 compatible 
> behavior.
>  Or it could just use reflection.

In my experience having code conforming to a given Java version gives problems
especially when having several of these each for their own Java version all put
in the same source tree.

Personally I think that the best way to do this kind of "call this method which
we know at runtime if it exists or not" is through reflection.  If the code is
written and debugged first as a normal Java method it is not hard to transform
the finished result into reflection method calls. 


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to