From: Brett H. <bho...@us...> - 2010-09-29 23:54:09
|
Update of /cvsroot/jmri/jmri/jmrit/withrottle In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv32077 Modified Files: AbstractWiThrottlePreferences.java Log Message: FindBugs fixes Index: AbstractWiThrottlePreferences.java =================================================================== RCS file: /cvsroot/jmri/jmri/jmrit/withrottle/AbstractWiThrottlePreferences.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractWiThrottlePreferences.java 27 Mar 2010 18:52:54 -0000 1.1 --- AbstractWiThrottlePreferences.java 29 Sep 2010 23:53:59 -0000 1.2 *************** *** 45,51 **** File parentDir=file.getParentFile(); if(!parentDir.exists()){ ! parentDir.mkdir(); } ! file.createNewFile(); }catch (Exception ea) { log.error("Could not create WiThrottle preferences file."); --- 45,54 ---- File parentDir=file.getParentFile(); if(!parentDir.exists()){ ! if (!parentDir.mkdir()) { ! log.warn("Could not create parent directory for prefs file :"+fileName); ! return; ! } } ! if (file.createNewFile()) log.debug("Creating new WiThrottle prefs file: "+fileName); }catch (Exception ea) { log.error("Could not create WiThrottle preferences file."); *************** *** 64,68 **** public AbstractWiThrottlePreferences(){} ! public class AbstractWiThrottlePreferencesXml extends XmlFile{} private static org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(AbstractWiThrottlePreferences.class.getName()); --- 67,71 ---- public AbstractWiThrottlePreferences(){} ! public static class AbstractWiThrottlePreferencesXml extends XmlFile{} private static org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(AbstractWiThrottlePreferences.class.getName()); |