You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by an...@apache.org on 2011/08/03 19:20:01 UTC
svn commit: r1153587 -
/cocoon/cocoon3/trunk/cocoon-wicket/src/main/java/org/apache/cocoon/wicket/sitemap/WicketReader.java
Author: anathaniel
Date: Wed Aug 3 17:20:00 2011
New Revision: 1153587
URL: http://svn.apache.org/viewvc?rev=1153587&view=rev
Log:
Use generic Enumerations and limit scope of @SuppressWarnings("unchecked") in calls to non-generic servlet API methods
Modified:
cocoon/cocoon3/trunk/cocoon-wicket/src/main/java/org/apache/cocoon/wicket/sitemap/WicketReader.java
Modified: cocoon/cocoon3/trunk/cocoon-wicket/src/main/java/org/apache/cocoon/wicket/sitemap/WicketReader.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-wicket/src/main/java/org/apache/cocoon/wicket/sitemap/WicketReader.java?rev=1153587&r1=1153586&r2=1153587&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-wicket/src/main/java/org/apache/cocoon/wicket/sitemap/WicketReader.java (original)
+++ cocoon/cocoon3/trunk/cocoon-wicket/src/main/java/org/apache/cocoon/wicket/sitemap/WicketReader.java Wed Aug 3 17:20:00 2011
@@ -148,7 +148,6 @@ public class WicketReader implements Sta
}
}
- @SuppressWarnings( { "deprecation" })
private static class CocoonWicketHttpServletResponse implements HttpServletResponse {
private final OutputStream cocoonOutputStream;
@@ -180,6 +179,7 @@ public class WicketReader implements Sta
return this.response.containsHeader(name);
}
+ @Deprecated
public String encodeRedirectUrl(String url) {
return this.response.encodeRedirectUrl(url);
}
@@ -188,6 +188,7 @@ public class WicketReader implements Sta
return this.response.encodeRedirectURL(url);
}
+ @Deprecated
public String encodeUrl(String url) {
return this.response.encodeUrl(url);
}
@@ -314,12 +315,12 @@ public class WicketReader implements Sta
this.response.setStatus(sc);
}
+ @Deprecated
public void setStatus(int sc, String sm) {
this.response.setStatus(sc, sm);
}
}
- @SuppressWarnings( { "unchecked", "deprecation" })
private static class CocoonWicketServletContext implements ServletContext {
private final String basePath;
@@ -334,7 +335,8 @@ public class WicketReader implements Sta
return this.servletContext.getAttribute(name);
}
- public Enumeration getAttributeNames() {
+ @SuppressWarnings("unchecked")
+ public Enumeration<String> getAttributeNames() {
return this.servletContext.getAttributeNames();
}
@@ -346,7 +348,8 @@ public class WicketReader implements Sta
return this.servletContext.getInitParameter(name);
}
- public Enumeration getInitParameterNames() {
+ @SuppressWarnings("unchecked")
+ public Enumeration<String> getInitParameterNames() {
return this.servletContext.getInitParameterNames();
}
@@ -387,7 +390,8 @@ public class WicketReader implements Sta
return this.servletContext.getResourceAsStream(path);
}
- public Set getResourcePaths(String path) {
+ @SuppressWarnings("unchecked")
+ public Set<String> getResourcePaths(String path) {
return this.servletContext.getResourcePaths(path);
}
@@ -395,6 +399,7 @@ public class WicketReader implements Sta
return this.servletContext.getServerInfo();
}
+ @Deprecated
public Servlet getServlet(String name) throws ServletException {
return this.servletContext.getServlet(name);
}
@@ -403,14 +408,19 @@ public class WicketReader implements Sta
return this.servletContext.getServletContextName();
}
- public Enumeration getServletNames() {
+ @Deprecated
+ @SuppressWarnings("unchecked")
+ public Enumeration<String> getServletNames() {
return this.servletContext.getServletNames();
}
- public Enumeration getServlets() {
+ @Deprecated
+ @SuppressWarnings("unchecked")
+ public Enumeration<Servlet> getServlets() {
return this.servletContext.getServlets();
}
+ @Deprecated
public void log(Exception exception, String msg) {
this.servletContext.log(exception, msg);
}