ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant Location.java
Date Mon, 31 Mar 2003 15:08:37 GMT
bodewig     2003/03/31 07:08:37

  Modified:    src/main/org/apache/tools/ant Location.java
  Log:
  unURIfy build-file name if necessary.
  
  PR: 18352
  
  Revision  Changes    Path
  1.12      +7 -2      ant/src/main/org/apache/tools/ant/Location.java
  
  Index: Location.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Location.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Location.java	10 Feb 2003 14:13:30 -0000	1.11
  +++ Location.java	31 Mar 2003 15:08:37 -0000	1.12
  @@ -1,7 +1,7 @@
   /*
    * 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.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -55,6 +55,7 @@
   package org.apache.tools.ant;
   
   import java.io.Serializable;
  +import org.apache.tools.ant.util.FileUtils;
   import org.xml.sax.Locator;
   
   /**
  @@ -118,7 +119,11 @@
        * @param columnNumber Column number within the line.
        */
       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.columnNumber = columnNumber;
       }
  
  
  

Mime
View raw message