commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ep...@apache.org
Subject cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration PropertiesConfiguration.java
Date Sun, 28 Mar 2004 15:34:23 GMT
epugh       2004/03/28 07:34:23

  Modified:    configuration/src/java/org/apache/commons/configuration
                        PropertiesConfiguration.java
  Log:
  Bug in closing stream spotted by Stephen Colebourne.
  
  Revision  Changes    Path
  1.6       +4 -2      jakarta-commons/configuration/src/java/org/apache/commons/configuration/PropertiesConfiguration.java
  
  Index: PropertiesConfiguration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/PropertiesConfiguration.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PropertiesConfiguration.java	28 Mar 2004 14:43:04 -0000	1.5
  +++ PropertiesConfiguration.java	28 Mar 2004 15:34:23 -0000	1.6
  @@ -99,7 +99,9 @@
       public void load(String fileName) throws ConfigurationException
       {
       	try {
  -    		load(getPropertyStream(fileName));
  +    	    InputStream is = getPropertyStream(fileName);
  +    		load(is);
  +    		is.close();
       	}
       	catch (IOException ioe){
       		throw new ConfigurationException("Could not load from file " + fileName,ioe);
  
  
  

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


Mime
View raw message