1
0

Change the class used to detect whether JDK 1.4 is installed from

"java.util.logging.Logger" to "java.sql.Savepoint".  This means
that a JDK 1.3 JVM with an alternative JSR-47 (logging jsr) implementation
available will not be mis-identified as a JDK 1.4 system.

PR:  Bugzilla #16606
Submitted by:  Andreas Wendt <wen at eigner.com>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138951 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Craig R. McClanahan
2003-02-01 04:11:03 +00:00
parent 9e8e6b4991
commit f7faef2426

View File

@@ -1,7 +1,7 @@
/* /*
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java,v 1.20 2002/11/23 03:49:40 craigmcc Exp $ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java,v 1.21 2003/02/01 04:11:03 craigmcc Exp $
* $Revision: 1.20 $ * $Revision: 1.21 $
* $Date: 2002/11/23 03:49:40 $ * $Date: 2003/02/01 04:11:03 $
* *
* ==================================================================== * ====================================================================
* *
@@ -107,7 +107,7 @@ import org.apache.commons.logging.LogFactory;
* @author Rod Waldhoff * @author Rod Waldhoff
* @author Craig R. McClanahan * @author Craig R. McClanahan
* @author Richard A. Sitze * @author Richard A. Sitze
* @version $Revision: 1.20 $ $Date: 2002/11/23 03:49:40 $ * @version $Revision: 1.21 $ $Date: 2003/02/01 04:11:03 $
*/ */
public class LogFactoryImpl extends LogFactory { public class LogFactoryImpl extends LogFactory {
@@ -456,16 +456,16 @@ public class LogFactoryImpl extends LogFactory {
/** /**
* MUST KEEP THIS METHOD PRIVATE * MUST KEEP THIS METHOD PRIVATE
* *
* <p>Exposing this method outside of * <p>Exposing this method outside of
* <code>org.apache.commons.logging.LogFactoryImpl</code> * <code>org.apache.commons.logging.LogFactoryImpl</code>
* will create a security violation: * will create a security violation:
* This method uses <code>AccessController.doPrivileged()</code>. * This method uses <code>AccessController.doPrivileged()</code>.
* </p> * </p>
* *
* Load a class, try first the thread class loader, and * Load a class, try first the thread class loader, and
* if it fails use the loader that loaded this class. * if it fails use the loader that loaded this class.
*/ */
private static Class loadClass( final String name ) private static Class loadClass( final String name )
throws ClassNotFoundException throws ClassNotFoundException
{ {
@@ -519,7 +519,7 @@ public class LogFactoryImpl extends LogFactory {
protected boolean isJdk14Available() { protected boolean isJdk14Available() {
try { try {
loadClass("java.util.logging.Logger"); loadClass("java.sql.Savepoint");
loadClass("org.apache.commons.logging.impl.Jdk14Logger"); loadClass("org.apache.commons.logging.impl.Jdk14Logger");
return (true); return (true);
} catch (Throwable t) { } catch (Throwable t) {