Skip to content

Commit 41737e8

Browse files
committed
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.
1 parent b78fa27 commit 41737e8

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ public Enumeration<String> getAttributeNames() {
253253
return Collections.enumeration(new LinkedHashSet<String>(this.attributes.keySet()));
254254
}
255255

256-
@SuppressWarnings("unchecked")
257256
public Enumeration<String> getAttributeNamesInScope(int scope) {
258257
switch (scope) {
259258
case PAGE_SCOPE:

spring-test/src/main/java/org/springframework/mock/web/portlet/ServletWrappingPortletContext.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -91,7 +91,6 @@ public String getRealPath(String path) {
9191
return this.servletContext.getRealPath(path);
9292
}
9393

94-
@SuppressWarnings("unchecked")
9594
public Set<String> getResourcePaths(String path) {
9695
return this.servletContext.getResourcePaths(path);
9796
}
@@ -104,7 +103,6 @@ public Object getAttribute(String name) {
104103
return this.servletContext.getAttribute(name);
105104
}
106105

107-
@SuppressWarnings("unchecked")
108106
public Enumeration<String> getAttributeNames() {
109107
return this.servletContext.getAttributeNames();
110108
}
@@ -113,7 +111,6 @@ public String getInitParameter(String name) {
113111
return this.servletContext.getInitParameter(name);
114112
}
115113

116-
@SuppressWarnings("unchecked")
117114
public Enumeration<String> getInitParameterNames() {
118115
return this.servletContext.getInitParameterNames();
119116
}

0 commit comments

Comments
 (0)