NPE Bug in AntTransform.java
Added by Anonymous over 15 years ago
Legacy ID: #7555622 Legacy Poster: W. Eliot Kimber (drmacro)
I hit an NPE bug in using the saxon-xslt Ant task with the DITA Open Toolkit. The failure occurs when the filenameparameter= or filedirparameter= attributes are set on the <saxon-xslt> element. The bug is in the process() method, about line 742. I fixed the bug by moving the two lines: if (fileNameParameter != null) { transformer.setParameter(fileNameParameter, xmlFile); } if (fileDirParameter != null) { transformer.setParameter(fileDirParameter, baseDir.getAbsolutePath()); } to come after the call to configureLiaison(), before which, the transformer member is null, resulting in the NPE. Cheers, Eliot
Replies (1)
RE: NPE Bug in AntTransform.java - Added by Anonymous over 15 years ago
Legacy ID: #7560971 Legacy Poster: Michael Kay (mhkay)
Thanks. An equivalent change appears to have already been made in the 9.2 version of the source, though I can't see any evidence of a bug being logged. It's probably time I did a new build. One of the problems with this piece of code is the difficulty of testing: I don't have access to any test material for Ant; also I haven't succeeded in building Ant in my IDE so that I can put the code through a debugger. So it's a bit "orphaned" in its current status.
Please register to reply