summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org/madore/damlengine/TodoAttr.java5
-rw-r--r--org/madore/damlengine/TodoElement.java5
2 files changed, 2 insertions, 8 deletions
diff --git a/org/madore/damlengine/TodoAttr.java b/org/madore/damlengine/TodoAttr.java
index b9cb800..2b3df23 100644
--- a/org/madore/damlengine/TodoAttr.java
+++ b/org/madore/damlengine/TodoAttr.java
@@ -11,8 +11,7 @@ public abstract class TodoAttr extends TodoItem {
protected static Map<String,Constructor<? extends TodoAttr>> damlAttrConstructors;
- protected static void initializeDamlAttrConstructors() {
- // FIXME: this should be a static initializer, but for some reason does not work...
+ static {
damlAttrConstructors = new HashMap<String,Constructor<? extends TodoAttr>>();
Class[] argTypes = new Class[]{ Attr.class, Element.class, Map.class, Map.class };
try {
@@ -40,8 +39,6 @@ public abstract class TodoAttr extends TodoItem {
Map<String,Object> options) {
Constructor<? extends TodoAttr> constructor = null;
String nsuri = attr.getNamespaceURI();
- if ( damlAttrConstructors == null )
- initializeDamlAttrConstructors(); // FIXME: see above
if ( nsuri != null && nsuri.equals(DamlEngine.DAML_NS) )
constructor = damlAttrConstructors.get(attr.getLocalName());
if ( constructor != null )
diff --git a/org/madore/damlengine/TodoElement.java b/org/madore/damlengine/TodoElement.java
index f8dcca1..a069b36 100644
--- a/org/madore/damlengine/TodoElement.java
+++ b/org/madore/damlengine/TodoElement.java
@@ -10,8 +10,7 @@ public abstract class TodoElement extends TodoItem {
protected static Map<String,Constructor<? extends TodoElement>> damlConstructors;
- protected static void initializeDamlConstructors() {
- // FIXME: this should be a static initializer, but for some reason does not work...
+ static {
damlConstructors = new HashMap<String,Constructor<? extends TodoElement>>();
}
@@ -30,8 +29,6 @@ public abstract class TodoElement extends TodoItem {
Map<String,Object> options) {
Constructor<? extends TodoElement> constructor = null;
String nsuri = node.getNamespaceURI();
- if ( damlConstructors == null )
- initializeDamlConstructors(); // FIXME: see above
if ( nsuri != null && nsuri.equals(DamlEngine.DAML_NS) )
constructor = damlConstructors.get(node.getLocalName());
if ( constructor != null )