Browse Source

use our own code

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@292241 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 19 years ago
parent
commit
f45adb64fe
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/SchemaValidate.java

+ 4
- 1
src/main/org/apache/tools/ant/taskdefs/optional/SchemaValidate.java View File

@@ -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);


Loading…
Cancel
Save