--- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java Wed Jul 05 18:46:58 2017 +0200
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java Mon Feb 18 11:33:35 2013 -0800
@@ -41,10 +41,12 @@
import java.util.jar.Manifest;
import com.sun.org.apache.bcel.internal.classfile.JavaClass;
+import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
import com.sun.org.apache.xml.internal.dtm.DTM;
+import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
@@ -278,7 +280,7 @@
return compile(input, _className);
}
catch (IOException e) {
- _parser.reportError(Constants.FATAL, new ErrorMsg(e));
+ _parser.reportError(Constants.FATAL, new ErrorMsg(ErrorMsg.JAXP_COMPILE_ERR, e));
return false;
}
}
@@ -297,7 +299,7 @@
return compile(input, name);
}
catch (IOException e) {
- _parser.reportError(Constants.FATAL, new ErrorMsg(e));
+ _parser.reportError(Constants.FATAL, new ErrorMsg(ErrorMsg.JAXP_COMPILE_ERR, e));
return false;
}
}
@@ -382,11 +384,11 @@
}
catch (Exception e) {
/*if (_debug)*/ e.printStackTrace();
- _parser.reportError(Constants.FATAL, new ErrorMsg(e));
+ _parser.reportError(Constants.FATAL, new ErrorMsg(ErrorMsg.JAXP_COMPILE_ERR, e));
}
catch (Error e) {
if (_debug) e.printStackTrace();
- _parser.reportError(Constants.FATAL, new ErrorMsg(e));
+ _parser.reportError(Constants.FATAL, new ErrorMsg(ErrorMsg.JAXP_COMPILE_ERR, e));
}
finally {
_reader = null; // reset this here to be sure it is not re-used
@@ -594,7 +596,7 @@
*/
public boolean setDestDirectory(String dstDirName) {
final File dir = new File(dstDirName);
- if (dir.exists() || dir.mkdirs()) {
+ if (SecuritySupport.getFileExists(dir) || dir.mkdirs()) {
_destDir = dir;
return true;
}
@@ -767,7 +769,7 @@
String parentDir = outFile.getParent();
if (parentDir != null) {
File parentFile = new File(parentDir);
- if (!parentFile.exists())
+ if (!SecuritySupport.getFileExists(parentFile))
parentFile.mkdirs();
}
}