- Revision
- 796
- Author
- mauro
- Date
- 2008-08-28 18:53:00 -0500 (Thu, 28 Aug 2008)
Log Message
Minor cleanup of generics compilation warnings.
Modified Paths
- trunk/waffle-core/src/main/java/org/codehaus/waffle/context/ContextContainerFactory.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/context/pico/HttpSessionComponentAdapter.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/context/pico/PicoLifecycleStrategy.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/pico/PicoRegistrar.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/pico/RequestAttributeParameter.java
Diff
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/context/ContextContainerFactory.java (795 => 796)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/context/ContextContainerFactory.java 2008-08-28 12:19:56 UTC (rev 795) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/context/ContextContainerFactory.java 2008-08-28 23:53:00 UTC (rev 796) @@ -7,11 +7,10 @@ import javax.servlet.http.HttpServletRequest; /** - * Implementors of this interface are responsible for maintaining the components - * defined in an applications Registrar. This abstraction of the container - * relies on its ability to maintain tree's of containers which allows Waffle - * to work so well. - * + * Implementors of this interface are responsible for maintaining the components defined in an applications Registrar. + * This abstraction of the container relies on its ability to maintain trees of containers which allows Waffle to work + * so well. + * * @author Michael Ward */ public interface ContextContainerFactory { @@ -23,4 +22,5 @@ ContextContainer buildSessionLevelContainer(); ContextContainer buildRequestLevelContainer(HttpServletRequest request); + }
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/context/pico/HttpSessionComponentAdapter.java (795 => 796)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/context/pico/HttpSessionComponentAdapter.java 2008-08-28 12:19:56 UTC (rev 795) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/context/pico/HttpSessionComponentAdapter.java 2008-08-28 23:53:00 UTC (rev 796) @@ -17,7 +17,7 @@ import java.lang.reflect.Proxy; import java.lang.reflect.Type; [EMAIL PROTECTED]("serial") [EMAIL PROTECTED]({ "serial", "unchecked" }) public class HttpSessionComponentAdapter implements ComponentAdapter, Serializable { private final Class<?> componentImplementation = HttpSession.class;
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/context/pico/PicoLifecycleStrategy.java (795 => 796)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/context/pico/PicoLifecycleStrategy.java 2008-08-28 12:19:56 UTC (rev 795) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/context/pico/PicoLifecycleStrategy.java 2008-08-28 23:53:00 UTC (rev 796) @@ -7,6 +7,7 @@ import org.picocontainer.ComponentMonitor; import org.picocontainer.lifecycle.StartableLifecycleStrategy; [EMAIL PROTECTED]("serial") public class PicoLifecycleStrategy extends StartableLifecycleStrategy { public PicoLifecycleStrategy(ComponentMonitor componentMonitor) { super(componentMonitor); @@ -20,7 +21,7 @@ return "start"; } - protected Class getStartableInterface() { - return Startable.class; + protected Class<?> getStartableInterface() { + return Startable.class; } }
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/pico/PicoRegistrar.java (795 => 796)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/pico/PicoRegistrar.java 2008-08-28 12:19:56 UTC (rev 795) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/pico/PicoRegistrar.java 2008-08-28 23:53:00 UTC (rev 796) @@ -87,7 +87,7 @@ } public Registrar register(Object key, Class<?> type, Object... parameters) { - ComponentAdapter componentAdapter = buildComponentAdapter(key, type, parameters); + ComponentAdapter<?> componentAdapter = buildComponentAdapter(key, type, parameters); registerCachedComponentAdapter(componentAdapter); registrarMonitor.componentRegistered(key, type, parameters); return this; @@ -110,18 +110,18 @@ } public Registrar registerNonCaching(Object key, Class<?> type, Object... parameters) { - ComponentAdapter componentAdapter = buildComponentAdapter(key, type, parameters); + ComponentAdapter<?> componentAdapter = buildComponentAdapter(key, type, parameters); registerUnCachedComponentAdapter(componentAdapter); registrarMonitor.nonCachingComponentRegistered(key, type, parameters); return this; } - public void registerUnCachedComponentAdapter(ComponentAdapter componentAdapter) { + public void registerUnCachedComponentAdapter(ComponentAdapter<?> componentAdapter) { picoContainer.as(NO_CACHE).addAdapter(componentAdapter); } - public void registerCachedComponentAdapter(ComponentAdapter componentAdapter) { + public void registerCachedComponentAdapter(ComponentAdapter<?> componentAdapter) { picoContainer.as(CACHE).addAdapter(componentAdapter); } @@ -137,7 +137,7 @@ return picoParameters; } - private ComponentAdapter buildComponentAdapter(Object key, Class<?> type, Object... parameters) { + private ComponentAdapter<?> buildComponentAdapter(Object key, Class<?> type, Object... parameters) { InjectionFactory componentAdapterFactory; if (injection == Injection.CONSTRUCTOR) {
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/pico/RequestAttributeParameter.java (795 => 796)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/pico/RequestAttributeParameter.java 2008-08-28 12:19:56 UTC (rev 795) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/pico/RequestAttributeParameter.java 2008-08-28 23:53:00 UTC (rev 796) @@ -13,7 +13,7 @@ /** * Will resolve value from the [EMAIL PROTECTED] HttpServletRequest} attribute. - * + * * @author Michael Ward */ class RequestAttributeParameter extends AbstractWaffleParameter { @@ -22,13 +22,8 @@ super(key); } - @SuppressWarnings({"unchecked"}) - public Object resolveInstance(PicoContainer picoContainer, - ComponentAdapter<?> componentAdapter, - Type type, - NameBinding nameBinding, - boolean b, - Annotation annotation) { + public Object resolveInstance(PicoContainer picoContainer, ComponentAdapter<?> componentAdapter, Type type, + NameBinding nameBinding, boolean b, Annotation annotation) { HttpServletRequest request = picoContainer.getComponent(HttpServletRequest.class); return request.getAttribute(getKey()); }
To unsubscribe from this list please visit:
