Ceki,
 
No, I put version checking code in to make sure that there's no harm on JDK 1.1:
 
VersionHelper (abstract base class with factory method)
VersionHelper11 (concrete subclass with JDK 1.1 Class.forName() call)
VersionHelper20 (concrete subclass using Thread.currentThread().getContextClassLoader().loadClass() call)
 
Version check works like this:
 
VersionHelper getInstance()
{
    try
    {
        Class.forName("java.util.List");
        return (VersionHelper)Class.forName("org.apache.log4j.helpers.VersionHelper20").newInstance();
    }
    catch (ClassNotFoundException oops)
    {
        return new VersionHelper11();
    }
}
-Chris
 
----- Original Message -----
From: "Ceki Gülcü" <[EMAIL PROTECTED]>
To: "LOG4J Developers Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, June 17, 2001 12:37 PM
Subject: Re: [Update] source that handles classloading properly on Java 1.X versus Java 2.X


Hi Anders,

I have not looked at your code yet but I'll do so shortly. If I understand correctly, your changes require JDK 1.2. However, log4j still required to be 1.1 compatible. We can of course remove this requirement.  I'd like to move to JDK 1.2 but I am not sure our user base would appreciate.

By the way, it is easier for a reviewer to study your changes if you submit your contribution in "diff -u" format. Cheers, Ceki

At 01:34 16.06.2001 -0700, Christopher Taylor wrote:
>I've made the needed changes to Log4J to make sure class are loaded properly
>using ContextClassLoader on Java 2 platforms.
>
>The changes are attached.
>
>-Chris
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail:
[EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

--
Ceki Gülcü


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

Reply via email to