diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-14 04:16:49 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-14 04:16:49 +0000 |
commit | b5ee5de9dfb6f50dcdc81e69a5ecaa2b299238c6 (patch) | |
tree | de82bde74ebdfe06c0ee7afe7b3617457b06a12b /sca-java-2.x/trunk/modules | |
parent | d4743525775f0d49ab021887e7402967d12d32be (diff) |
Passing ExtensionPointRegistry into the constructor
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@933855 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
2 files changed, 5 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultDataBindingExtensionPoint.java b/sca-java-2.x/trunk/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultDataBindingExtensionPoint.java index 34219bd7a9..22b6e8646e 100644 --- a/sca-java-2.x/trunk/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultDataBindingExtensionPoint.java +++ b/sca-java-2.x/trunk/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultDataBindingExtensionPoint.java @@ -51,8 +51,8 @@ public class DefaultDataBindingExtensionPoint implements DataBindingExtensionPoi private static final Logger logger = Logger.getLogger(DefaultDataBindingExtensionPoint.class.getName()); private boolean loadedDataBindings; - public DefaultDataBindingExtensionPoint() { - } +// public DefaultDataBindingExtensionPoint() { +// } public DefaultDataBindingExtensionPoint(ExtensionPointRegistry registry) { this.registry = registry; @@ -62,6 +62,7 @@ public class DefaultDataBindingExtensionPoint implements DataBindingExtensionPoi if (id == null) { return null; } + loadDataBindings(); DataBinding dataBinding = bindings.get(id.toLowerCase()); if (dataBinding == null) { loadDataBindings(); diff --git a/sca-java-2.x/trunk/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/extension/DataBindingExtensionTestCase.java b/sca-java-2.x/trunk/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/extension/DataBindingExtensionTestCase.java index 8cbe7fcd71..defa62a49e 100644 --- a/sca-java-2.x/trunk/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/extension/DataBindingExtensionTestCase.java +++ b/sca-java-2.x/trunk/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/extension/DataBindingExtensionTestCase.java @@ -25,6 +25,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; import org.apache.tuscany.sca.databinding.BaseDataBinding; import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint; import org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint; @@ -51,7 +52,7 @@ public class DataBindingExtensionTestCase { assertFalse(binding1.introspect(dt2, null)); assertNull(binding1.getWrapperHandler()); - DataBindingExtensionPoint registry = new DefaultDataBindingExtensionPoint(); + DataBindingExtensionPoint registry = new DefaultDataBindingExtensionPoint(new DefaultExtensionPointRegistry()); registry.addDataBinding(binding1); assertNotNull(registry.getDataBinding(Node.class.getName())); |