From 41737e827cf47c933f664b1256af67dd278e1620 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 26 Mar 2013 15:15:37 +0100 Subject: [PATCH] Remove warning suppression in mocks This commit removes the suppression of warnings in Servlet and Portlet mocks since such suppression is no longer necessary with the upgrade to version 3.0 of the Servlet specification. --- .../java/org/springframework/mock/web/MockPageContext.java | 1 - .../mock/web/portlet/ServletWrappingPortletContext.java | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java b/spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java index 2c5d07e8e3c..eefae930348 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java @@ -253,7 +253,6 @@ public class MockPageContext extends PageContext { return Collections.enumeration(new LinkedHashSet(this.attributes.keySet())); } - @SuppressWarnings("unchecked") public Enumeration getAttributeNamesInScope(int scope) { switch (scope) { case PAGE_SCOPE: diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/ServletWrappingPortletContext.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/ServletWrappingPortletContext.java index 75d52b5e4cf..93415e79bac 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/ServletWrappingPortletContext.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/ServletWrappingPortletContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,7 +91,6 @@ public class ServletWrappingPortletContext implements PortletContext { return this.servletContext.getRealPath(path); } - @SuppressWarnings("unchecked") public Set getResourcePaths(String path) { return this.servletContext.getResourcePaths(path); } @@ -104,7 +103,6 @@ public class ServletWrappingPortletContext implements PortletContext { return this.servletContext.getAttribute(name); } - @SuppressWarnings("unchecked") public Enumeration getAttributeNames() { return this.servletContext.getAttributeNames(); } @@ -113,7 +111,6 @@ public class ServletWrappingPortletContext implements PortletContext { return this.servletContext.getInitParameter(name); } - @SuppressWarnings("unchecked") public Enumeration getInitParameterNames() { return this.servletContext.getInitParameterNames(); }