I read the bug as affecting jdk1.2.? on linux and windows and jdk1.3 on windows. I do not think this is a problem on my linux box using sun's jdk1.3. As I have posted previously, I am able to get the dtd parsed, but the parser is not validating. Of course this does not mean the patch is wrong other than possibly the comment. John McNally (I hope I get this to the correct list,) Java Apache CVS Development wrote: > > User: mpoeschl > Date: 01/02/01 17:58:44 > > Modified: src/java/org/apache/turbine/torque/transform > DTDResolver.java > Log: > workaround for bug in (sun?) linux jdk1.3 > Bug Id 4337703 > > Revision Changes Path > 1.2 +11 -6 >turbine/src/java/org/apache/turbine/torque/transform/DTDResolver.java > > Index: DTDResolver.java > =================================================================== > RCS file: >/products/cvs/turbine/turbine/src/java/org/apache/turbine/torque/transform/DTDResolver.java,v > retrieving revision 1.1 > retrieving revision 1.2 > diff -u -r1.1 -r1.2 > --- DTDResolver.java 2001/01/08 23:59:01 1.1 > +++ DTDResolver.java 2001/02/02 01:58:43 1.2 > @@ -71,15 +71,17 @@ > import org.apache.turbine.torque.model.*; > > /** > - * A resolver to get the database.dtd file for the XML parser > + * A resolver to get the database.dtd file for the XML parser from the jar. > + * This does not work with jdk1.3 on linux because of a known bug: > + * @see http://developer.java.sun.com/developer/bugParade/bugs/4337703.html > * > * @author <a href="mailto:[EMAIL PROTECTED]">Martin Poeschl</a> > - * @version $Id: DTDResolver.java,v 1.1 2001/01/08 23:59:01 mpoeschl Exp $ > + * @version $Id: DTDResolver.java,v 1.2 2001/02/02 01:58:43 mpoeschl Exp $ > */ > public class DTDResolver implements EntityResolver > { > /** InputSource for database.dtd */ > - InputSource databaseDTD; > + InputSource databaseDTD = null; > > /** > * constructor > @@ -88,8 +90,9 @@ > { > try > { > - databaseDTD = new InputSource(getClass() > - .getResource("database.dtd").openStream()); > + URL url = getClass().getResource("database.dtd"); > + if (url != null) // jdk1.3 on linux allways returns null!! > + databaseDTD = new InputSource(url.openStream()); > } > catch (Exception ex) > { > @@ -104,7 +107,8 @@ > */ > public InputSource resolveEntity(String publicId, String systemId) > { > - if ("http://java.apache.org/turbine/dtd/database.dtd".equals(systemId)) > + if (databaseDTD != null && > + "http://java.apache.org/turbine/dtd/database.dtd".equals(systemId)) > { > System.out.println("Resolver: use database.dtd"); > return databaseDTD; > @@ -136,6 +140,7 @@ > return new InputSource(); > } // getInputSource(String) > } > + > > > > > > ------------------------------------------------------------ To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/> Problems?: [EMAIL PROTECTED]
