Author: edwardsmj
Date: Thu May 7 19:22:17 2009
New Revision: 772749
URL: http://svn.apache.org/viewvc?rev=772749&view=rev
Log:
Cleaned Generics problems from Spring implementation files
Modified:
tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationTie.java
Modified:
tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java?rev=772749&r1=772748&r2=772749&view=diff
==============================================================================
---
tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
(original)
+++
tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
Thu May 7 19:22:17 2009
@@ -49,7 +49,7 @@
// Mapping of Services to Beans
private Hashtable<String, SpringBeanElement> serviceMap;
// Mapping of property names to Java class
- private Hashtable<String, Class> propertyMap;
+ private Hashtable<String, Class<?>> propertyMap;
// List of unresolved bean property references
private Hashtable<String, Reference> unresolvedBeanRef;
@@ -58,7 +58,7 @@
this.resource = null;
setUnresolved(true);
serviceMap = new Hashtable<String, SpringBeanElement>();
- propertyMap = new Hashtable<String, Class>();
+ propertyMap = new Hashtable<String, Class<?>>();
unresolvedBeanRef = new Hashtable<String, Reference>();
} // end method SpringImplementation
@@ -137,7 +137,7 @@
* @param propertyName
* @param propertyClass
*/
- public void setPropertyClass(String propertyName, Class propertyClass) {
+ public void setPropertyClass(String propertyName, Class<?> propertyClass) {
if (propertyName == null || propertyClass == null)
return;
propertyMap.put(propertyName, propertyClass);
@@ -149,7 +149,7 @@
* @param propertyName - the property name
* @return - a Class object for the type of the property
*/
- public Class getPropertyClass(String propertyName) {
+ public Class<?> getPropertyClass(String propertyName) {
return propertyMap.get(propertyName);
} // end method getPropertyClass
Modified:
tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationTie.java
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationTie.java?rev=772749&r1=772748&r2=772749&view=diff
==============================================================================
---
tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationTie.java
(original)
+++
tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringImplementationTie.java
Thu May 7 19:22:17 2009
@@ -63,7 +63,7 @@
* @param name - the Property name
* @return - a Bean of the specified property, with value set
*/
- private <B> B getPropertyBean(Class requiredType, String name) {
+ private <B> B getPropertyBean(Class<?> requiredType, String name) {
B propertyObject = null;
// Get the component's list of properties
List<ComponentProperty> props = component.getProperties();
@@ -71,7 +71,7 @@
if (prop.getName().equals(name)) {
// On finding the property, create a factory for it and create
a Bean using
// the factory
- ObjectFactory factory =
propertyFactory.createValueFactory(prop, prop.getValue(), requiredType);
+ ObjectFactory<?> factory =
propertyFactory.createValueFactory(prop, prop.getValue(), requiredType);
propertyObject = (B)factory.getInstance();
} // end if
} // end for
@@ -97,7 +97,7 @@
* @param requiredType - the required type of the Bean (either a Java
class or a Java interface)
* @return Object - a Bean which matches the requested bean
*/
- public Object getBean(String name, Class requiredType) {
+ public Object getBean(String name, Class<?> requiredType) {
System.out.println("Spring parent context - getBean called for name: "
+ name);
// The expectation is that the requested Bean is either a reference or
a property
// from the Spring context