From b099739d69690535623b126b37f47bfdfecf040f Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 20 May 2009 16:46:55 +0000 Subject: Refactoring a few methods on the ServiceDiscover Adding an OSGi service registry based ExtensionPointRegistry implementation git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@776759 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/databinding/DefaultDataBindingExtensionPoint.java | 4 ++-- .../tuscany/sca/databinding/DefaultTransformerExtensionPoint.java | 4 ++-- .../sca/databinding/javabeans/DOMNode2JavaBeanTransformer.java | 1 + .../org/apache/tuscany/sca/databinding/impl/DataBindingTestCase.java | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) (limited to 'java/sca/modules/databinding') diff --git a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultDataBindingExtensionPoint.java b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultDataBindingExtensionPoint.java index 6ebfc29121..c8ad274316 100644 --- a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultDataBindingExtensionPoint.java +++ b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultDataBindingExtensionPoint.java @@ -21,10 +21,10 @@ package org.apache.tuscany.sca.databinding; import java.io.IOException; import java.lang.reflect.Constructor; import java.util.ArrayList; +import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; @@ -103,7 +103,7 @@ public class DefaultDataBindingExtensionPoint implements DataBindingExtensionPoi return; // Get the databinding service declarations - Set dataBindingDeclarations; + Collection dataBindingDeclarations; try { dataBindingDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations(DataBinding.class.getName()); } catch (IOException e) { diff --git a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultTransformerExtensionPoint.java b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultTransformerExtensionPoint.java index 2583270b3d..fc8b89c5b9 100644 --- a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultTransformerExtensionPoint.java +++ b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultTransformerExtensionPoint.java @@ -21,9 +21,9 @@ package org.apache.tuscany.sca.databinding; import java.io.IOException; import java.lang.reflect.Constructor; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; @@ -112,7 +112,7 @@ public class DefaultTransformerExtensionPoint implements TransformerExtensionPoi private synchronized void loadTransformers(Class transformerClass) { // Get the transformer service declarations - Set transformerDeclarations; + Collection transformerDeclarations; try { transformerDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations(transformerClass.getName()); diff --git a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/DOMNode2JavaBeanTransformer.java b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/DOMNode2JavaBeanTransformer.java index 2f95c2a9c6..f86d1b29e0 100644 --- a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/DOMNode2JavaBeanTransformer.java +++ b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/javabeans/DOMNode2JavaBeanTransformer.java @@ -21,6 +21,7 @@ package org.apache.tuscany.sca.databinding.javabeans; import java.util.ArrayList; import java.util.Iterator; import java.util.List; + import javax.xml.namespace.QName; import org.w3c.dom.Document; diff --git a/java/sca/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/impl/DataBindingTestCase.java b/java/sca/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/impl/DataBindingTestCase.java index 9f5ead2ea5..c5d6dbbcc1 100644 --- a/java/sca/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/impl/DataBindingTestCase.java +++ b/java/sca/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/impl/DataBindingTestCase.java @@ -18,10 +18,11 @@ */ package org.apache.tuscany.sca.databinding.impl; +import static org.junit.Assert.assertEquals; + import java.lang.reflect.Method; import org.apache.tuscany.sca.databinding.annotation.DataBinding; -import static org.junit.Assert.assertEquals; /** * -- cgit v1.2.3