on 8/15/01 12:15 PM, "Vincent Massol" <[EMAIL PROTECTED]> wrote:

> what if I package Log4j version
> 10 which has a new method named makeCoffee() of class CoffeeAppender and it
> happens that the end user is using Log4j version 6 which does not have this
> method (but has the CoffeAppender class) and the Log4 version 6 jar is put
> *before* my component jar ... Then, it seems to me my code which calls
> makeCoffee() will break at runtime, no ?

Yes, but you have explicitly already stated that your code has a dependency
on a certain version (or higher) of Log4J.

This problem is outside of the scope of current discussion of Logging
wrapper issues because whatever logging wrapper you use will have the same
problems in the implementation for Log4J within the wrapper. By using a
wrapper, you are just moving this issue into another area of code instead of
your own, not getting rid of it.

As far as I can tell, user error of this type cannot be prevented without
doing runtime version checking before the code is called.

-jon

Reply via email to