From: Erik V. <ev...@us...> - 2010-05-15 22:44:54
|
Update of /cvsroot/rails/18xx/rails/util In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv26563/rails/util Modified Files: Config.java Log Message: Enable custom route colours Index: Config.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/util/Config.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Config.java 16 Jan 2010 14:09:33 -0000 1.11 --- Config.java 15 May 2010 22:44:46 -0000 1.12 *************** *** 49,52 **** --- 49,62 ---- } + public static String get(String key, String defaultValue) { + + if (prop.isEmpty() || !loaded) { + load(); + } + if (prop.containsKey(key)) return prop.getProperty(key).trim(); + + return defaultValue; + } + private static void load() { |