ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: found a bug in Jdk14LoggingImpl.java
Date Thu, 01 Feb 2007 18:01:22 GMT
This will then be a problem in 1.4 and 1.5 too, since the
Class.toString() method hasn't changed in years.

Niels

-----Original Message-----
From: msr [mailto:msr@gmx.de] 
Sent: donderdag 1 februari 2007 18:54
To: user-java@ibatis.apache.org
Subject: found a bug in Jdk14LoggingImpl.java

Hi!

I found a bug in the com.ibatis.common.logging.jdk14Jdk14LoggingImpl
class under Java 6.

Look at the constructor:

public Jdk14LoggingImpl(Class clazz) {
  log = Logger.getLogger(clazz.toString());
}

Under Java 6 the toString() Method of Class returns the name of the
class prefixed with "class " or "interface"! So you will never get the
correct JDK logger.

A better an working solution would be to use the getName() method
instead of the toString() method. Can anyone please fix this?

Thanks a lot!

Marc



Mime
View raw message