commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34362] - [configuration] AbstractFileConfiguration.save() creates a new file instead of overwritting the existing one
Date Thu, 07 Apr 2005 21:48:58 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34362>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34362





------- Additional Comments From JMGuillemette@hotmail.com  2005-04-07 23:48 -------
Created an attachment (id=14658)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=14658&action=view)
Just the changed logic

public void save(String fileName) throws ConfigurationException{
  try{
     URL url = ConfigurationUtils.locate(basePath, fileName);
     File file = new File(url.getPath());
     if (file == null){
	throw new ConfigurationException("Invalid file name for save:
"+fileName);
     }
     save(file);
  } catch (Exception e){
     throw new ConfigurationException(e.getMessage(), e);
  }
}

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
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