You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by va...@apache.org on 2010/01/28 07:46:51 UTC

svn commit: r903974 - in /tuscany/sca-java-1.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/introspect: PropertyProcessor.java ReferenceProcessor.java

Author: vamsic007
Date: Thu Jan 28 06:46:51 2010
New Revision: 903974

URL: http://svn.apache.org/viewvc?rev=903974&view=rev
Log:
TUSCANY-3448 SCA Property and Reference annotation processing in web application results in incorrect computed names
 o Removed the classname prefix when name attribute is not specified in the annotation
 o Rev 903972 in 1.6 branch

Modified:
    tuscany/sca-java-1.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/introspect/PropertyProcessor.java
    tuscany/sca-java-1.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/introspect/ReferenceProcessor.java

Modified: tuscany/sca-java-1.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/introspect/PropertyProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/introspect/PropertyProcessor.java?rev=903974&r1=903973&r2=903974&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/introspect/PropertyProcessor.java (original)
+++ tuscany/sca-java-1.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/introspect/PropertyProcessor.java Thu Jan 28 06:46:51 2010
@@ -78,8 +78,6 @@
             if (name.startsWith("set")) {
                 name = JavaIntrospectionHelper.toPropertyName(method.getName());
             }
-            // When the name is not specified, prefix the computed name with the class name
-            name = method.getDeclaringClass().getName()+"_"+name;
         }
 
         Map<String, JavaElementImpl> properties = type.getPropertyMembers();
@@ -113,8 +111,6 @@
         }
         if ("".equals(name) || name.equals(field.getType().getName())) {
             name = field.getName();
-            // When the name is not specified, prefix the computed name with the class name
-            name = field.getDeclaringClass().getName()+"_"+name;
         }
 
         Map<String, JavaElementImpl> properties = type.getPropertyMembers();

Modified: tuscany/sca-java-1.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/introspect/ReferenceProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/introspect/ReferenceProcessor.java?rev=903974&r1=903973&r2=903974&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/introspect/ReferenceProcessor.java (original)
+++ tuscany/sca-java-1.x/trunk/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/introspect/ReferenceProcessor.java Thu Jan 28 06:46:51 2010
@@ -69,8 +69,6 @@
         String name = annotation.name();
         if ("".equals(name)) {
             name = JavaIntrospectionHelper.toPropertyName(method.getName());
-            // When the name is not specified, prefix the computed name with the class name
-            name = method.getDeclaringClass().getName()+"_"+name;
         }
         JavaElementImpl ref = type.getReferenceMembers().get(name);
         // Setter override field
@@ -108,8 +106,6 @@
         String name = annotation.name();
         if ("".equals(name)) {
             name = field.getName();
-            // When the name is not specified, prefix the computed name with the class name
-            name = field.getDeclaringClass().getName()+"_"+name;
         }
         JavaElementImpl ref = type.getReferenceMembers().get(name);
         if (ref != null && ref.getElementType() == ElementType.FIELD) {