Author: simonetripodi Date: Wed Oct 26 06:18:03 2011 New Revision: 1189035 URL: http://svn.apache.org/viewvc?rev=1189035&view=rev Log: [CHAIN-61] Chain 2.0 trunk build is throwing many warnings as a result of generification changes (Contributed by Elijah Zupancic)
Modified: commons/proper/chain/trunk/src/changes/changes.xml commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/config/ConfigParser.java commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/config/ConfigRegisterRule.java commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/impl/CatalogBase.java commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/impl/ContextBase.java commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/ChainListener.java commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/ChainResources.java commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/faces/FacesWebContext.java commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/portlet/PortletApplicationScopeMap.java commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/portlet/PortletParamMap.java commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/PathInfoMapper.java commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/RequestParameterMapper.java commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/ServletParamValuesMap.java commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/ServletPathMapper.java commons/proper/chain/trunk/src/test/java/org/apache/commons/chain/impl/DelegatingFilter.java commons/proper/chain/trunk/src/test/java/org/apache/commons/chain/impl/NonDelegatingFilter.java Modified: commons/proper/chain/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/changes/changes.xml?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/changes/changes.xml (original) +++ commons/proper/chain/trunk/src/changes/changes.xml Wed Oct 26 06:18:03 2011 @@ -40,6 +40,10 @@ The <action> type attribute can be add,u <body> <release version="2.0" description="Major release"> + <action dev="simonetripodi" type="add" issue="CHAIN-61"> + Chain 2.0 trunk build is throwing many warnings as a result of generification changes + - Contributed by Elijah Zupancic + </action> <action dev="simonetripodi" type="add" issue="CHAIN-56"> clever Context with generic type "auto-cast" feature. </action> Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/config/ConfigParser.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/config/ConfigParser.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/config/ConfigParser.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/config/ConfigParser.java Wed Oct 26 06:18:03 2011 @@ -156,6 +156,7 @@ public class ConfigParser { * @deprecated Use parse(URL) on a configuration resource with "factory" * element(s) embedded */ + @Deprecated public void parse(Catalog catalog, URL url) throws Exception { // Prepare our Digester instance Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/config/ConfigRegisterRule.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/config/ConfigRegisterRule.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/config/ConfigRegisterRule.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/config/ConfigRegisterRule.java Wed Oct 26 06:18:03 2011 @@ -20,6 +20,7 @@ package org.apache.commons.chain.config; import org.apache.commons.chain.Catalog; import org.apache.commons.chain.Chain; import org.apache.commons.chain.Command; +import org.apache.commons.chain.Context; import org.apache.commons.digester.Rule; import org.xml.sax.Attributes; @@ -77,6 +78,7 @@ class ConfigRegisterRule extends Rule { * the element name otherwise * @param attributes The attribute list of this element */ + @Override public void begin(String namespace, String name, Attributes attributes) throws Exception { @@ -86,7 +88,12 @@ class ConfigRegisterRule extends Rule { || !(top instanceof Command)) { return; } - Command command = (Command) top; + + /* All commands can consume a generic context. Here we depend on + * the configuration being correct because the rule binding is + * dynamic. */ + @SuppressWarnings("unchecked") + Command<Context> command = (Command<Context>) top; // Is the next object a Catalog or a Chain? Object next = digester.peek(1); @@ -98,10 +105,15 @@ class ConfigRegisterRule extends Rule { if (next instanceof Catalog) { String nameValue = attributes.getValue(nameAttribute); if (nameValue != null) { - ((Catalog) next).addCommand(nameValue, command); + Catalog catalog = (Catalog) next; + catalog.addCommand(nameValue, command); } } else if (next instanceof Chain) { - ((Chain) next).addCommand(command); + /* Like above - the chain is being dynamically generated, + * so we can add a generic context signature at compile-time. */ + @SuppressWarnings("unchecked") + Chain<Context> chain = (Chain<Context>) next; + chain.addCommand(command); } } Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/impl/CatalogBase.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/impl/CatalogBase.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/impl/CatalogBase.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/impl/CatalogBase.java Wed Oct 26 06:18:03 2011 @@ -96,10 +96,9 @@ public class CatalogBase implements Cata * should be retrieved * @return The Command associated with the specified name. */ - public <C extends Context> Command<C> getCommand(String name) { + public Command<? extends Context> getCommand(String name) { - @SuppressWarnings( "unchecked" ) // will throw a cast exception at runtime! - Command<C> command = (Command<C>) commands.get(name); + Command<? extends Context> command = commands.get(name); return command; } @@ -130,6 +129,7 @@ public class CatalogBase implements Cata * Converts this Catalog to a String. Useful for debugging purposes. * @return a representation of this catalog as a String */ + @Override public String toString() { Iterator<String> names = getNames(); Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/impl/ContextBase.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/impl/ContextBase.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/impl/ContextBase.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/impl/ContextBase.java Wed Oct 26 06:18:03 2011 @@ -52,7 +52,8 @@ import org.apache.commons.chain.Context; * @version $Revision$ $Date$ */ -public class ContextBase extends ConcurrentHashMap<String, Object> implements Context { +public class ContextBase extends ConcurrentHashMap<String, Object> + implements Context { // ------------------------------------------------------------ Constructors @@ -622,15 +623,23 @@ public class ContextBase extends Concurr */ private class EntrySetImpl extends AbstractSet<Entry<String, Object>> { + @Override public void clear() { ContextBase.this.clear(); } + @Override public boolean contains(Object obj) { - if (!(obj instanceof Map.Entry)) { + if (!(obj instanceof Map.Entry && + ((Map.Entry)obj).getKey() instanceof String)) { return (false); } - Map.Entry<String, Object> entry = (Map.Entry) obj; + + /* The contains method is expecting the search type to be of the + * same type stored. This contract is enforced as a precondition. + * So we can safely suppress type safety warnings below. */ + @SuppressWarnings("unchecked") + Map.Entry<String, Object> entry = (Map.Entry<String, Object>) obj; Entry actual = ContextBase.this.entry(entry.getKey()); if (actual != null) { return (actual.equals(entry)); @@ -639,6 +648,7 @@ public class ContextBase extends Concurr } } + @Override public boolean isEmpty() { return (ContextBase.this.isEmpty()); } @@ -647,9 +657,17 @@ public class ContextBase extends Concurr return (ContextBase.this.entriesIterator()); } + @Override public boolean remove(Object obj) { - if (obj instanceof Map.Entry) { - return (ContextBase.this.remove((Map.Entry<String, Object>) obj)); + if (obj instanceof Map.Entry && + ((Map.Entry)obj).getKey() instanceof String ) { + + /* The remove method is expecting an input of the the same + * type as the entry set. This precondition is checked above, + * so we can safely suppress the unchecked warnings. */ + @SuppressWarnings("unchecked") + Map.Entry<String, Object> entry = (Map.Entry<String, Object>) obj; + return (ContextBase.this.remove(entry)); } else { return (false); } @@ -701,6 +719,7 @@ public class ContextBase extends Concurr private String key; private Object value; + @Override public boolean equals(Object obj) { if (obj == null) { return (false); @@ -730,6 +749,7 @@ public class ContextBase extends Concurr return (this.value); } + @Override public int hashCode() { return (((key == null) ? 0 : key.hashCode()) ^ ((value == null) ? 0 : value.hashCode())); @@ -742,6 +762,7 @@ public class ContextBase extends Concurr return (previous); } + @Override public String toString() { return getKey() + "=" + getValue(); } @@ -754,10 +775,12 @@ public class ContextBase extends Concurr */ private class ValuesImpl extends AbstractCollection<Object> { + @Override public void clear() { ContextBase.this.clear(); } + @Override public boolean contains(Object obj) { if (!(obj instanceof Map.Entry)) { return (false); @@ -766,6 +789,7 @@ public class ContextBase extends Concurr return (ContextBase.this.containsValue(entry.getValue())); } + @Override public boolean isEmpty() { return (ContextBase.this.isEmpty()); } @@ -774,9 +798,17 @@ public class ContextBase extends Concurr return (ContextBase.this.valuesIterator()); } + @Override public boolean remove(Object obj) { - if (obj instanceof Map.Entry) { - return (ContextBase.this.remove((Map.Entry) obj)); + if (obj instanceof Map.Entry && + ((Map.Entry)obj).getKey() instanceof String) { + + /* We are expecting the passed entry to be of a type + * Entry<String, Object>. This is checked in the precondition + * above, so we can safely suppress unchecked warnings. */ + @SuppressWarnings("unchecked") + Map.Entry<String, Object> entry = (Map.Entry) obj; + return (ContextBase.this.remove(entry)); } else { return (false); } Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/ChainListener.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/ChainListener.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/ChainListener.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/ChainListener.java Wed Oct 26 06:18:03 2011 @@ -301,6 +301,7 @@ public class ChainListener implements Se * @deprecated Use the variant that does not take a catalog, on a * configuration resource containing "catalog" element(s) */ + @Deprecated private void parseJarResources(Catalog catalog, ServletContext context, ConfigParser parser, Log log) { @@ -313,7 +314,7 @@ public class ChainListener implements Se Iterator<String> paths = jars.iterator(); while (paths.hasNext()) { - path = (String) paths.next(); + path = paths.next(); if (!path.endsWith(".jar")) { continue; } Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/ChainResources.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/ChainResources.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/ChainResources.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/ChainResources.java Wed Oct 26 06:18:03 2011 @@ -102,6 +102,7 @@ final class ChainResources { * @deprecated Use the variant that does not take a catalog, on a * configuration resource containing "catalog" element(s) */ + @Deprecated static void parseClassResources(Catalog catalog, String resources, ConfigParser parser) { @@ -188,6 +189,7 @@ final class ChainResources { * @deprecated Use the variant that does not take a catalog, on a * configuration resource containing "catalog" element(s) */ + @Deprecated static void parseWebResources(Catalog catalog, ServletContext context, String resources, ConfigParser parser) { Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/faces/FacesWebContext.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/faces/FacesWebContext.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/faces/FacesWebContext.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/faces/FacesWebContext.java Wed Oct 26 06:18:03 2011 @@ -129,8 +129,12 @@ public class FacesWebContext extends Web * @return Application scope Map. */ public Map<String, Object> getApplicationScope() { - - return (context.getExternalContext().getApplicationMap()); + + @SuppressWarnings("unchecked") // Assume faces is following contract + Map<String, Object> scope = (Map<String, Object>) + context.getExternalContext().getApplicationMap(); + + return (scope); } @@ -141,8 +145,12 @@ public class FacesWebContext extends Web * @return Header values Map. */ public Map<String, String> getHeader() { - - return (context.getExternalContext().getRequestHeaderMap()); + + @SuppressWarnings("unchecked") // Assume faces is following contract + Map<String, String> headers = (Map<String, String>) + context.getExternalContext().getRequestHeaderMap(); + + return (headers); } @@ -153,8 +161,12 @@ public class FacesWebContext extends Web * @return Header values Map. */ public Map<String, String[]> getHeaderValues() { - - return (context.getExternalContext().getRequestHeaderValuesMap()); + + @SuppressWarnings("unchecked") // Assume faces is following contract + Map<String, String[]> headerValues = (Map<String, String[]>) + context.getExternalContext().getRequestHeaderValuesMap(); + + return (headerValues); } @@ -165,8 +177,12 @@ public class FacesWebContext extends Web * @return Initialization parameter Map. */ public Map<String, String> getInitParam() { - - return (context.getExternalContext().getInitParameterMap()); + + @SuppressWarnings("unchecked") // Assume faces is following contract + Map<String, String> initParams = (Map<String, String>) + context.getExternalContext().getInitParameterMap(); + + return (initParams); } @@ -177,8 +193,11 @@ public class FacesWebContext extends Web * @return Request parameter Map. */ public Map<String, String> getParam() { - - return (context.getExternalContext().getRequestParameterMap()); + @SuppressWarnings("unchecked") + Map<String, String> params = (Map<String, String>) + context.getExternalContext().getRequestParameterMap(); + + return (params); } @@ -189,8 +208,11 @@ public class FacesWebContext extends Web * @return Request parameter Map. */ public Map<String, String[]> getParamValues() { - - return (context.getExternalContext().getRequestParameterValuesMap()); + @SuppressWarnings("unchecked") // Assume faces is following contract + Map<String, String[]> paramValues = (Map<String, String[]>) + context.getExternalContext().getRequestParameterValuesMap(); + + return (paramValues); } @@ -203,7 +225,8 @@ public class FacesWebContext extends Web */ public Map<String, Cookie> getCookies() { - Map<String, Object> facesCookieMap = + @SuppressWarnings("unchecked") // Assume faces is following contract + Map<String, Object> facesCookieMap = (Map<String, Object>) context.getExternalContext().getRequestCookieMap(); /* This ugly hack was done because the faces API implements @@ -216,6 +239,8 @@ public class FacesWebContext extends Web Object cookieObj = itr.next(); if (cookieObj instanceof Cookie) { + // See comment above about type safety check + @SuppressWarnings("unchecked") Map<String, Cookie> cookieMap = Collections.checkedMap( (Map)facesCookieMap, String.class, Cookie.class); @@ -226,7 +251,7 @@ public class FacesWebContext extends Web throw new ClassCastException(msg); } } else { - return Collections.EMPTY_MAP; + return Collections.emptyMap(); } } @@ -237,8 +262,12 @@ public class FacesWebContext extends Web * @return Request scope Map. */ public Map<String, Object> getRequestScope() { - - return (context.getExternalContext().getRequestMap()); + + @SuppressWarnings("unchecked") // Assume faces is following contract + Map<String, Object> scope = (Map<String, Object>) + context.getExternalContext().getRequestMap(); + + return (scope); } @@ -249,8 +278,12 @@ public class FacesWebContext extends Web * @return Session scope Map. */ public Map<String, Object> getSessionScope() { - - return (context.getExternalContext().getSessionMap()); + + @SuppressWarnings("unchecked") // Assume faces is following contract + Map<String, Object> scope = (Map<String, Object>) + context.getExternalContext().getSessionMap(); + + return (scope); } Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/portlet/PortletApplicationScopeMap.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/portlet/PortletApplicationScopeMap.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/portlet/PortletApplicationScopeMap.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/portlet/PortletApplicationScopeMap.java Wed Oct 26 06:18:03 2011 @@ -156,7 +156,7 @@ final class PortletApplicationScopeMap i List<Object> list = new ArrayList<Object>(); Enumeration<String> keys = context.getAttributeNames(); while (keys.hasMoreElements()) { - list.add(context.getAttribute((String) keys.nextElement())); + list.add(context.getAttribute(keys.nextElement())); } return (list); } Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/portlet/PortletParamMap.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/portlet/PortletParamMap.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/portlet/PortletParamMap.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/portlet/PortletParamMap.java Wed Oct 26 06:18:03 2011 @@ -134,7 +134,7 @@ final class PortletParamMap implements M List<String> list = new ArrayList<String>(); Enumeration<String> keys = request.getParameterNames(); while (keys.hasMoreElements()) { - list.add(request.getParameter((String) keys.nextElement())); + list.add(request.getParameter(keys.nextElement())); } return (list); } Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/PathInfoMapper.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/PathInfoMapper.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/PathInfoMapper.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/PathInfoMapper.java Wed Oct 26 06:18:03 2011 @@ -58,6 +58,7 @@ public class PathInfoMapper<C extends Co * @deprecated Use catalogName to specify the name of the catalog in the * catalog factory */ + @Deprecated public String getCatalogKey() { return (this.catalogKey); @@ -74,6 +75,7 @@ public class PathInfoMapper<C extends Co * @deprecated Use catalogName to specify the name of the catalog in the * catalog factory */ + @Deprecated public void setCatalogKey(String catalogKey) { this.catalogKey = catalogKey; @@ -93,6 +95,7 @@ public class PathInfoMapper<C extends Co * * @since Chain 1.2 */ + @Override protected String getCommandName(Context context) { // Look up the extra path information for this request @@ -118,6 +121,7 @@ public class PathInfoMapper<C extends Co * * @since Chain 1.2 */ + @Override protected Catalog getCatalog(C context) { Catalog catalog = (Catalog) context.get(getCatalogName()); if (catalog == null) { Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/RequestParameterMapper.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/RequestParameterMapper.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/RequestParameterMapper.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/RequestParameterMapper.java Wed Oct 26 06:18:03 2011 @@ -73,6 +73,7 @@ public class RequestParameterMapper<C ex * @deprecated Use catalogName to specify the name of the catalog in the * catalog factory */ + @Deprecated public void setCatalogKey(String catalogKey) { this.catalogKey = catalogKey; @@ -89,6 +90,7 @@ public class RequestParameterMapper<C ex * @deprecated Use catalogName to specify the name of the catalog in the * catalog factory */ + @Deprecated public String getParameter() { return (this.parameter); @@ -121,6 +123,7 @@ public class RequestParameterMapper<C ex * * @since Chain 1.2 */ + @Override protected String getCommandName(C context) { // Look up the specified request parameter for this request @@ -142,6 +145,7 @@ public class RequestParameterMapper<C ex * * @since Chain 1.2 */ + @Override protected Catalog getCatalog(C context) { Catalog catalog = (Catalog) context.get(getCatalogKey()); if (catalog == null) { Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/ServletParamValuesMap.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/ServletParamValuesMap.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/ServletParamValuesMap.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/ServletParamValuesMap.java Wed Oct 26 06:18:03 2011 @@ -138,7 +138,7 @@ final class ServletParamValuesMap implem @SuppressWarnings( "unchecked" ) // it is known that header names are String Enumeration<String> keys = request.getParameterNames(); while (keys.hasMoreElements()) { - list.add(request.getParameterValues((String) keys.nextElement())); + list.add(request.getParameterValues(keys.nextElement())); } return (list); } Modified: commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/ServletPathMapper.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/ServletPathMapper.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/ServletPathMapper.java (original) +++ commons/proper/chain/trunk/src/main/java/org/apache/commons/chain/web/servlet/ServletPathMapper.java Wed Oct 26 06:18:03 2011 @@ -58,6 +58,7 @@ public class ServletPathMapper<C extends * @deprecated Use catalogName to specify the name of the catalog in the * catalog factory */ + @Deprecated public String getCatalogKey() { return (this.catalogKey); @@ -74,6 +75,7 @@ public class ServletPathMapper<C extends * @deprecated Use catalogName to specify the name of the catalog in the * catalog factory */ + @Deprecated public void setCatalogKey(String catalogKey) { this.catalogKey = catalogKey; Modified: commons/proper/chain/trunk/src/test/java/org/apache/commons/chain/impl/DelegatingFilter.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/test/java/org/apache/commons/chain/impl/DelegatingFilter.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/test/java/org/apache/commons/chain/impl/DelegatingFilter.java (original) +++ commons/proper/chain/trunk/src/test/java/org/apache/commons/chain/impl/DelegatingFilter.java Wed Oct 26 06:18:03 2011 @@ -29,7 +29,7 @@ import org.apache.commons.chain.Filter; * @version $Revision$ $Date$ */ -public class DelegatingFilter extends NonDelegatingFilter { +public class DelegatingFilter<C extends Context> extends NonDelegatingFilter<C> { // ------------------------------------------------------------ Constructor @@ -50,7 +50,8 @@ public class DelegatingFilter extends No // Execution method for this Command - public boolean execute(Context context) throws Exception { + @Override + public boolean execute(C context) throws Exception { super.execute(context); return (false); Modified: commons/proper/chain/trunk/src/test/java/org/apache/commons/chain/impl/NonDelegatingFilter.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/test/java/org/apache/commons/chain/impl/NonDelegatingFilter.java?rev=1189035&r1=1189034&r2=1189035&view=diff ============================================================================== --- commons/proper/chain/trunk/src/test/java/org/apache/commons/chain/impl/NonDelegatingFilter.java (original) +++ commons/proper/chain/trunk/src/test/java/org/apache/commons/chain/impl/NonDelegatingFilter.java Wed Oct 26 06:18:03 2011 @@ -29,8 +29,8 @@ import org.apache.commons.chain.Filter; * @version $Revision$ $Date$ */ -public class NonDelegatingFilter extends NonDelegatingCommand - implements Filter { +public class NonDelegatingFilter<C extends Context> + extends NonDelegatingCommand<C> implements Filter<C> { // ------------------------------------------------------------- Constructor @@ -64,7 +64,8 @@ public class NonDelegatingFilter extends // Execution method for this Command - public boolean execute(Context context) throws Exception { + @Override + public boolean execute(C context) throws Exception { super.execute(context); return (true); @@ -73,7 +74,7 @@ public class NonDelegatingFilter extends // Postprocess method for this Filter - public boolean postprocess(Context context, Exception exception) { + public boolean postprocess(C context, Exception exception) { log(context, id2); return (false); }