From f45adb64fe4845bc5e44cea075b39180fbb453a0 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Wed, 28 Sep 2005 18:31:20 +0000 Subject: [PATCH] use our own code git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@292241 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tools/ant/taskdefs/optional/SchemaValidate.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/SchemaValidate.java b/src/main/org/apache/tools/ant/taskdefs/optional/SchemaValidate.java index ce70bdd94..123f1394d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/SchemaValidate.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/SchemaValidate.java @@ -18,6 +18,7 @@ package org.apache.tools.ant.taskdefs.optional; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; +import org.apache.tools.ant.util.FileUtils; import org.apache.tools.ant.util.XmlConstants; import org.apache.tools.ant.util.JAXPUtils; import org.xml.sax.XMLReader; @@ -389,8 +390,10 @@ public class SchemaValidate extends XMLValidateTask { if (!file.exists()) { throw new BuildException(ERROR_NO_FILE + file); } + try { - schema = file.toURL().toString(); + schema = + FileUtils.getFileUtils().getFileURL(file).toString(); } catch (MalformedURLException e) { //this is almost implausible, but required handling throw new BuildException(ERROR_NO_URL_REPRESENTATION + file,e);