From 81f5ab2068a97840f6d5f3e8e4c86801749bc6d9 Mon Sep 17 00:00:00 2001 From: mcombellack Date: Tue, 9 Dec 2008 12:47:01 +0000 Subject: Fixed generics raw type compiler warnings git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@724672 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/core/invocation/CachedProxy.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'java/sca/modules') diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/CachedProxy.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/CachedProxy.java index d729dfad19..8c8f001eb9 100644 --- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/CachedProxy.java +++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/CachedProxy.java @@ -34,20 +34,20 @@ public class CachedProxy extends Proxy { // This is a cache containing the proxy class constructor for each business interface. // This improves performance compared to calling Proxy.newProxyInstance() // every time that a proxy is needed. - private static WeakHashMap, Object> cache = new WeakHashMap, Object>(); + private final static WeakHashMap, Constructor> cache = new WeakHashMap, Constructor>(); - public static Object newProxyInstance(ClassLoader classloader, Class aclass[], InvocationHandler invocationhandler) + public static Object newProxyInstance(ClassLoader classloader, Class aclass[], InvocationHandler invocationhandler) throws IllegalArgumentException { try { if (invocationhandler == null) throw new NullPointerException(); // Lookup cached constructor. aclass[0] is the reference's business interface. - Constructor proxyCTOR; + Constructor proxyCTOR; synchronized (cache) { - proxyCTOR = (Constructor)cache.get(aclass[0]); + proxyCTOR = cache.get(aclass[0]); } if (proxyCTOR == null) { - Class proxyClass = getProxyClass(classloader, aclass); + Class proxyClass = getProxyClass(classloader, aclass); proxyCTOR = proxyClass.getConstructor(constructorParams); synchronized (cache) { cache.put(aclass[0], proxyCTOR); -- cgit v1.2.3