Browse Source

unURIfy build-file name if necessary.

PR: 18352


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274353 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
49dd9d7a4e
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      src/main/org/apache/tools/ant/Location.java

+ 7
- 2
src/main/org/apache/tools/ant/Location.java View File

@@ -1,7 +1,7 @@
/* /*
* The Apache Software License, Version 1.1 * The Apache Software License, Version 1.1
* *
* Copyright (c) 2000,2002 The Apache Software Foundation. All rights
* Copyright (c) 2000,2002-2003 The Apache Software Foundation. All rights
* reserved. * reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -55,6 +55,7 @@
package org.apache.tools.ant; package org.apache.tools.ant;


import java.io.Serializable; import java.io.Serializable;
import org.apache.tools.ant.util.FileUtils;
import org.xml.sax.Locator; import org.xml.sax.Locator;


/** /**
@@ -118,7 +119,11 @@ public class Location implements Serializable {
* @param columnNumber Column number within the line. * @param columnNumber Column number within the line.
*/ */
public Location(String fileName, int lineNumber, int columnNumber) { public Location(String fileName, int lineNumber, int columnNumber) {
this.fileName = fileName;
if (fileName != null && fileName.startsWith("file:")) {
this.fileName = FileUtils.newFileUtils().fromURI(fileName);
} else {
this.fileName = fileName;
}
this.lineNumber = lineNumber; this.lineNumber = lineNumber;
this.columnNumber = columnNumber; this.columnNumber = columnNumber;
} }


Loading…
Cancel
Save