This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit cc0056cad9da0fa0f3d5b081544b0953a2cd1304 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Apr 23 21:02:10 2020 +0100 Generics fixes for JSPs --- test/webapp/WEB-INF/tags/bug49297.tag | 2 +- test/webapp/bug49nnn/bug49297MultipleImport1.jsp | 2 +- test/webapp/bug49nnn/bug49297MultipleImport2.jsp | 2 +- webapps/examples/jsp/tagplugin/foreach.jsp | 2 +- webapps/manager/WEB-INF/jsp/sessionDetail.jsp | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/webapp/WEB-INF/tags/bug49297.tag b/test/webapp/WEB-INF/tags/bug49297.tag index f3fc275..940d968 100644 --- a/test/webapp/WEB-INF/tags/bug49297.tag +++ b/test/webapp/WEB-INF/tags/bug49297.tag @@ -16,6 +16,6 @@ --%><%@ tag import="java.util.List" import="java.util.ArrayList"%><%@ tag body-content="empty" %><% // Make sure the imports above do work - List<String> l = new ArrayList<String>(); + List<String> l = new ArrayList<>(); l.add("OK"); %><p><%=l.get(0)%></p> \ No newline at end of file diff --git a/test/webapp/bug49nnn/bug49297MultipleImport1.jsp b/test/webapp/bug49nnn/bug49297MultipleImport1.jsp index 63c102b..01fa614 100644 --- a/test/webapp/bug49nnn/bug49297MultipleImport1.jsp +++ b/test/webapp/bug49nnn/bug49297MultipleImport1.jsp @@ -20,7 +20,7 @@ <body> <% // Make sure the imports above do work - List<String> l = new ArrayList<String>(); + List<String> l = new ArrayList<>(); l.add("OK"); %> <p><%=l.get(0)%></p> diff --git a/test/webapp/bug49nnn/bug49297MultipleImport2.jsp b/test/webapp/bug49nnn/bug49297MultipleImport2.jsp index 28629a4..33b0dbd 100644 --- a/test/webapp/bug49nnn/bug49297MultipleImport2.jsp +++ b/test/webapp/bug49nnn/bug49297MultipleImport2.jsp @@ -21,7 +21,7 @@ <body> <% // Make sure the imports above do work - List<String> l = new ArrayList<String>(); + List<String> l = new ArrayList<>(); l.add("OK"); %> <p><%=l.get(0)%></p> diff --git a/webapps/examples/jsp/tagplugin/foreach.jsp b/webapps/examples/jsp/tagplugin/foreach.jsp index 81621cc..4803506 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<>(); 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 2f81e05..c24d337 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org