You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/04/23 21:23:04 UTC
[tomcat] 02/05: Generics fixes for JSPs
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 1be170fcf07e6105ecd4761e04fad6382540a534
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Apr 23 21:02:10 2020 +0100
Generics fixes for JSPs
---
webapps/examples/jsp/tagplugin/foreach.jsp | 2 +-
webapps/manager/WEB-INF/jsp/sessionDetail.jsp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/webapps/examples/jsp/tagplugin/foreach.jsp b/webapps/examples/jsp/tagplugin/foreach.jsp
index 81621cc..2def434 100644
--- a/webapps/examples/jsp/tagplugin/foreach.jsp
+++ b/webapps/examples/jsp/tagplugin/foreach.jsp
@@ -39,7 +39,7 @@
${item}
</c:forEach>
- <% Vector v = new Vector();
+ <% Vector<String> v = new Vector<String>();
v.add("One"); v.add("Two"); v.add("Three"); v.add("Four");
pageContext.setAttribute("vector", v);
diff --git a/webapps/manager/WEB-INF/jsp/sessionDetail.jsp b/webapps/manager/WEB-INF/jsp/sessionDetail.jsp
index 41c2134..1eb1222 100644
--- a/webapps/manager/WEB-INF/jsp/sessionDetail.jsp
+++ b/webapps/manager/WEB-INF/jsp/sessionDetail.jsp
@@ -119,7 +119,7 @@
<table style="text-align: left;" border="1" cellpadding="2" cellspacing="2">
<% int nAttributes = 0;
- Enumeration attributeNamesEnumeration = currentHttpSession.getAttributeNames();
+ Enumeration<String> attributeNamesEnumeration = currentHttpSession.getAttributeNames();
while (attributeNamesEnumeration.hasMoreElements()) {
attributeNamesEnumeration.nextElement();
++nAttributes;
@@ -143,7 +143,7 @@
<tbody>
<% attributeNamesEnumeration = currentHttpSession.getAttributeNames();
while (attributeNamesEnumeration.hasMoreElements()) {
- String attributeName = (String) attributeNamesEnumeration.nextElement();
+ String attributeName = attributeNamesEnumeration.nextElement();
%>
<tr>
<td align="center">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org