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/taskdefs Replace.java
Date Tue, 21 Sep 2004 11:38:27 GMT
bodewig     2004/09/21 04:38:27

  Modified:    .        Tag: ANT_16_BRANCH CONTRIBUTORS
               src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        Replace.java
  Log:
  merge fix for 30469
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.23  +1 -0      ant/CONTRIBUTORS
  
  Index: CONTRIBUTORS
  ===================================================================
  RCS file: /home/cvs/ant/CONTRIBUTORS,v
  retrieving revision 1.1.2.22
  retrieving revision 1.1.2.23
  diff -u -r1.1.2.22 -r1.1.2.23
  --- CONTRIBUTORS	10 Sep 2004 08:55:54 -0000	1.1.2.22
  +++ CONTRIBUTORS	21 Sep 2004 11:38:27 -0000	1.1.2.23
  @@ -100,6 +100,7 @@
   Jon S. Stevens
   Jose Alberto Fernandez
   Josh Lucas
  +Juerg Wanner
   Keiron Liddle
   Keith Visco
   Kevin Ross
  
  
  
  No                   revision
  No                   revision
  1.47.2.6  +11 -1     ant/src/main/org/apache/tools/ant/taskdefs/Replace.java
  
  Index: Replace.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Replace.java,v
  retrieving revision 1.47.2.5
  retrieving revision 1.47.2.6
  diff -u -r1.47.2.5 -r1.47.2.6
  --- Replace.java	9 Mar 2004 17:01:34 -0000	1.47.2.5
  +++ Replace.java	21 Sep 2004 11:38:27 -0000	1.47.2.6
  @@ -328,8 +328,10 @@
       public Properties getProperties(File propertyFile) throws BuildException {
           Properties properties = new Properties();
   
  +        FileInputStream in = null;
           try {
  -            properties.load(new FileInputStream(propertyFile));
  +            in = new FileInputStream(propertyFile);
  +            properties.load(in);
           } catch (FileNotFoundException e) {
               String message = "Property file (" + propertyFile.getPath()
                   + ") not found.";
  @@ -338,6 +340,14 @@
               String message = "Property file (" + propertyFile.getPath()
                   + ") cannot be loaded.";
               throw new BuildException(message);
  +        } finally {
  +            if (in != null) {
  +                try {
  +                    in.close();
  +                } catch (IOException e) {
  +                    // ignore
  +                }
  +            }
           }
   
           return properties;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message