diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2012-02-10 09:43:24 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2012-02-10 09:43:24 +0000 |
commit | 0cc7b6691596eec2822d4d4c6b35b25e5f905efc (patch) | |
tree | adc5da684cf391798e85fc02e35bc792729a7e0b /sca-java-2.x/trunk/modules | |
parent | 59412d176cd4e7950cb48e48580a6de6fb8fec70 (diff) |
TUSCANY-3924 - revert some of the previous changes. we need to look at whether we are interpreting the spec correctly
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1242718 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
3 files changed, 8 insertions, 13 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/sca/implementation/java/util/Bean1.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/sca/implementation/java/util/Bean1.java index a289a58091..e993cdd382 100644 --- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/sca/implementation/java/util/Bean1.java +++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/sca/implementation/java/util/Bean1.java @@ -25,9 +25,9 @@ package org.apache.tuscany.sca.implementation.java.util; */ public class Bean1 extends SuperBean { - public static final int ALL_BEAN1_FIELDS = 6; //TUSCANY-3924 + ALL_SUPER_FIELDS; - public static final int ALL_BEAN1_PUBLIC_PROTECTED_FIELDS = 5; //TUSCANY-3924 + ALL_SUPER_PUBLIC_PROTECTED_FIELDS; - public static final int ALL_BEAN1_METHODS = 4; //TUSCANY-3924 + ALL_SUPER_METHODS - 1; + public static final int ALL_BEAN1_FIELDS = 6 + ALL_SUPER_FIELDS; + public static final int ALL_BEAN1_PUBLIC_PROTECTED_FIELDS = 5 + ALL_SUPER_PUBLIC_PROTECTED_FIELDS; + public static final int ALL_BEAN1_METHODS = 4 + ALL_SUPER_METHODS - 1; public String field3; protected String field2; private String field1; diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/sca/implementation/java/util/JavaIntrospectionHelperTestCase.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/sca/implementation/java/util/JavaIntrospectionHelperTestCase.java index dfb3c77966..9624865dcc 100644 --- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/sca/implementation/java/util/JavaIntrospectionHelperTestCase.java +++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/sca/implementation/java/util/JavaIntrospectionHelperTestCase.java @@ -29,7 +29,6 @@ import java.util.Map; import java.util.Set; import org.apache.tuscany.sca.implementation.java.introspect.JavaIntrospectionHelper; -import org.junit.Ignore; import org.junit.Test; /** @@ -47,7 +46,7 @@ public class JavaIntrospectionHelperTestCase { @Test public void testBean1AllPublicProtectedFields() throws Exception { Set<Field> beanFields = JavaIntrospectionHelper.getAllPublicAndProtectedFields(Bean1.class, true); - assertEquals(2, beanFields.size()); //Bean1.ALL_BEAN1_PUBLIC_PROTECTED_FIELDS + assertEquals(4, beanFields.size()); //Bean1.ALL_BEAN1_PUBLIC_PROTECTED_FIELDS } @Test @@ -76,8 +75,7 @@ public class JavaIntrospectionHelperTestCase { throw new Exception("Override never invoked"); } } - - @Ignore("TUSCANY-3924") + @Test public void testNoOverrideMethod() throws Exception { Set<Method> beanFields = JavaIntrospectionHelper.getAllUniquePublicProtectedMethods(Bean1.class, true); diff --git a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/JavaIntrospectionHelper.java b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/JavaIntrospectionHelper.java index f67ebe793c..a04ad3721a 100644 --- a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/JavaIntrospectionHelper.java +++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/JavaIntrospectionHelper.java @@ -83,8 +83,7 @@ public final class JavaIntrospectionHelper { if (clazz == null || clazz.isArray() || Object.class.equals(clazz)) { return fields; } - // TUSCANY-3924 - don't consider inherited fields - //fields = getAllPublicAndProtectedFields(clazz.getSuperclass(), fields, validating); + fields = getAllPublicAndProtectedFields(clazz.getSuperclass(), fields, validating); Field[] declaredFields = null; @@ -137,8 +136,7 @@ public final class JavaIntrospectionHelper { return fields; } - // TUSCANY-3924 - don't consider inherited fields - //fields = getInjectableFields(clazz.getSuperclass(), fields, validating); + fields = getInjectableFields(clazz.getSuperclass(), fields, validating); Field[] declaredFields = null; @@ -237,8 +235,7 @@ public final class JavaIntrospectionHelper { } // evaluate class hierarchy - this is done last to track inherited // methods - // TUSCANY-3924 - don't consider inherited fields - //methods = getAllUniqueMethods(pClass.getSuperclass(), methods, validating); + methods = getAllUniqueMethods(pClass.getSuperclass(), methods, validating); return methods; } |