Passing ExtensionPointRegistry into the constructor
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@933855 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d474352577
commit
b5ee5de9df
2 changed files with 5 additions and 3 deletions
|
@ -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();
|
||||
|
|
|
@ -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()));
|
||||
|
|
Loading…
Add table
Reference in a new issue