diff --git a/src/org/openstreetmap/josm/data/preferences/AbstractProperty.java b/src/org/openstreetmap/josm/data/preferences/AbstractProperty.java
index 1516d42..e0584ca 100644
a
|
b
|
public abstract class AbstractProperty<T> {
|
20 | 20 | public AbstractProperty(String key, T defaultValue) { |
21 | 21 | this.key = key; |
22 | 22 | this.defaultValue = defaultValue; |
| 23 | if (Main.pref == null) { |
| 24 | Main.initApplicationPreferences(); |
| 25 | } |
23 | 26 | } |
24 | 27 | |
25 | 28 | /** |
diff --git a/src/org/openstreetmap/josm/data/preferences/BooleanProperty.java b/src/org/openstreetmap/josm/data/preferences/BooleanProperty.java
index 3e466f0..b9c6ed1 100644
a
|
b
|
public class BooleanProperty extends AbstractProperty<Boolean> {
|
15 | 15 | */ |
16 | 16 | public BooleanProperty(String key, boolean defaultValue) { |
17 | 17 | super(key, defaultValue); |
| 18 | get(); |
18 | 19 | } |
19 | 20 | |
20 | 21 | @Override |
diff --git a/src/org/openstreetmap/josm/data/preferences/CollectionProperty.java b/src/org/openstreetmap/josm/data/preferences/CollectionProperty.java
index dabd3c7..7b418d4 100644
a
|
b
|
public class CollectionProperty extends AbstractProperty<Collection<String>> {
|
17 | 17 | */ |
18 | 18 | public CollectionProperty(String key, Collection<String> defaultValue) { |
19 | 19 | super(key, defaultValue); |
| 20 | get(); |
20 | 21 | } |
21 | 22 | |
22 | 23 | @Override |
diff --git a/src/org/openstreetmap/josm/data/preferences/ColorProperty.java b/src/org/openstreetmap/josm/data/preferences/ColorProperty.java
index 8c1794b..c7a442b 100644
a
|
b
|
public class ColorProperty extends AbstractProperty<Color> implements ColorKey {
|
23 | 23 | public ColorProperty(String colName, Color defaultValue) { |
24 | 24 | super(getColorKey(colName), defaultValue); |
25 | 25 | this.name = colName; |
| 26 | get(); |
26 | 27 | } |
27 | 28 | |
28 | 29 | @Override |
diff --git a/src/org/openstreetmap/josm/data/preferences/IntegerProperty.java b/src/org/openstreetmap/josm/data/preferences/IntegerProperty.java
index 342b3ba..9774e46 100644
a
|
b
|
public class IntegerProperty extends AbstractProperty<Integer> {
|
16 | 16 | */ |
17 | 17 | public IntegerProperty(String key, int defaultValue) { |
18 | 18 | super(key, defaultValue); |
| 19 | get(); |
19 | 20 | } |
20 | 21 | |
21 | 22 | @Override |
diff --git a/src/org/openstreetmap/josm/data/preferences/ParametrizedEnumProperty.java b/src/org/openstreetmap/josm/data/preferences/ParametrizedEnumProperty.java
index 094a745..b6c4aaa 100644
a
|
b
|
public abstract class ParametrizedEnumProperty<T extends Enum<T>> {
|
11 | 11 | public ParametrizedEnumProperty(Class<T> enumClass, T defaultValue) { |
12 | 12 | this.defaultValue = defaultValue; |
13 | 13 | this.enumClass = enumClass; |
| 14 | get(); |
14 | 15 | } |
15 | 16 | |
16 | 17 | protected abstract String getKey(String... params); |
diff --git a/src/org/openstreetmap/josm/data/preferences/StringProperty.java b/src/org/openstreetmap/josm/data/preferences/StringProperty.java
index 1e352ad..84a649d 100644
a
|
b
|
public class StringProperty extends AbstractProperty<String> {
|
15 | 15 | */ |
16 | 16 | public StringProperty(String key, String defaultValue) { |
17 | 17 | super(key, defaultValue); |
| 18 | get(); |
18 | 19 | } |
19 | 20 | |
20 | 21 | @Override |