cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anathan...@apache.org
Subject svn commit: r1153587 - /cocoon/cocoon3/trunk/cocoon-wicket/src/main/java/org/apache/cocoon/wicket/sitemap/WicketReader.java
Date Wed, 03 Aug 2011 17:20:01 GMT
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);
         }



Mime
View raw message