Bug Fix: NPE in XsltRenderer

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6847 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Romain Pelisse 2009-02-16 12:17:11 +00:00
parent eb371c24a1
commit f7aa88db54

View File

@ -45,9 +45,11 @@ public class XSLTRenderer extends XMLRenderer {
* @param xsltFilename
*/
public XSLTRenderer(String xsltFilename) {
File file = new File(xsltFilename);
if ( xsltFilename != null && file.exists() && file.canRead() ) {
this.xsltFilename = xsltFilename;
if ( xsltFilename != null ) {
File file = new File(xsltFilename);
if ( file.exists() && file.canRead() ) {
this.xsltFilename = xsltFilename;
}
}
}