1.1 --- a/src/org/sonews/config/CommandLineConfig.java Sun Aug 29 17:28:58 2010 +0200
1.2 +++ b/src/org/sonews/config/CommandLineConfig.java Tue Jun 07 09:23:34 2011 +0200
1.3 @@ -28,37 +28,34 @@
1.4 class CommandLineConfig extends AbstractConfig
1.5 {
1.6
1.7 - private static final CommandLineConfig instance = new CommandLineConfig();
1.8 + private static final CommandLineConfig instance = new CommandLineConfig();
1.9
1.10 - public static CommandLineConfig getInstance()
1.11 - {
1.12 - return instance;
1.13 - }
1.14 + public static CommandLineConfig getInstance()
1.15 + {
1.16 + return instance;
1.17 + }
1.18 + private final Map<String, String> values = new HashMap<String, String>();
1.19
1.20 - private final Map<String, String> values = new HashMap<String, String>();
1.21 -
1.22 - private CommandLineConfig() {}
1.23 + private CommandLineConfig()
1.24 + {
1.25 + }
1.26
1.27 - @Override
1.28 - public String get(String key, String def)
1.29 - {
1.30 - synchronized(this.values)
1.31 - {
1.32 - if(this.values.containsKey(key))
1.33 - {
1.34 - def = this.values.get(key);
1.35 - }
1.36 - }
1.37 - return def;
1.38 - }
1.39 + @Override
1.40 + public String get(String key, String def)
1.41 + {
1.42 + synchronized (this.values) {
1.43 + if (this.values.containsKey(key)) {
1.44 + def = this.values.get(key);
1.45 + }
1.46 + }
1.47 + return def;
1.48 + }
1.49
1.50 - @Override
1.51 - public void set(String key, String val)
1.52 - {
1.53 - synchronized(this.values)
1.54 - {
1.55 - this.values.put(key, val);
1.56 - }
1.57 - }
1.58 -
1.59 + @Override
1.60 + public void set(String key, String val)
1.61 + {
1.62 + synchronized (this.values) {
1.63 + this.values.put(key, val);
1.64 + }
1.65 + }
1.66 }