1.1 --- a/src/org/sonews/config/CommandLineConfig.java Sun Sep 11 15:05:04 2011 +0200
1.2 +++ b/src/org/sonews/config/CommandLineConfig.java Sun Sep 11 17:01:19 2011 +0200
1.3 @@ -15,7 +15,6 @@
1.4 * You should have received a copy of the GNU General Public License
1.5 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1.6 */
1.7 -
1.8 package org.sonews.config;
1.9
1.10 import java.util.Map;
1.11 @@ -25,24 +24,20 @@
1.12 *
1.13 * @author Christian Lins
1.14 */
1.15 -class CommandLineConfig extends AbstractConfig
1.16 -{
1.17 +class CommandLineConfig extends AbstractConfig {
1.18
1.19 private static final CommandLineConfig instance = new CommandLineConfig();
1.20
1.21 - public static CommandLineConfig getInstance()
1.22 - {
1.23 + public static CommandLineConfig getInstance() {
1.24 return instance;
1.25 }
1.26 private final Map<String, String> values = new HashMap<String, String>();
1.27
1.28 - private CommandLineConfig()
1.29 - {
1.30 + private CommandLineConfig() {
1.31 }
1.32
1.33 @Override
1.34 - public String get(String key, String def)
1.35 - {
1.36 + public String get(String key, String def) {
1.37 synchronized (this.values) {
1.38 if (this.values.containsKey(key)) {
1.39 def = this.values.get(key);
1.40 @@ -52,8 +47,7 @@
1.41 }
1.42
1.43 @Override
1.44 - public void set(String key, String val)
1.45 - {
1.46 + public void set(String key, String val) {
1.47 synchronized (this.values) {
1.48 this.values.put(key, val);
1.49 }