tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r557454 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java
Date Thu, 19 Jul 2007 02:19:11 GMT
Author: markt
Date: Wed Jul 18 19:19:10 2007
New Revision: 557454

URL: http://svn.apache.org/viewvc?view=rev&rev=557454
Log:
Fix compiler warnings.
Filter output.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java?view=diff&rev=557454&r1=557453&r2=557454
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java
Wed Jul 18 19:19:10 2007
@@ -234,7 +234,8 @@
         for (int i = 0; i < children.length; i++)
             hostNames[i] = children[i].getName();
 
-        TreeMap sortedHostNamesMap = new TreeMap();
+        TreeMap<String,String> sortedHostNamesMap =
+            new TreeMap<String,String>();
 
         for (int i = 0; i < hostNames.length; i++) {
             String displayPath = hostNames[i];
@@ -245,15 +246,16 @@
         String hostsStop = sm.getString("htmlHostManagerServlet.hostsStop");
         String hostsRemove = sm.getString("htmlHostManagerServlet.hostsRemove");
 
-        Iterator iterator = sortedHostNamesMap.entrySet().iterator();
+        Iterator<Map.Entry<String,String>> iterator =
+            sortedHostNamesMap.entrySet().iterator();
         while (iterator.hasNext()) {
-            Map.Entry entry = (Map.Entry) iterator.next();
+            Map.Entry<String,String> entry = iterator.next();
             String hostName = (String) entry.getKey();
             Host host = (Host) engine.findChild(hostName);
 
             if (host != null ) {
                 args = new Object[2];
-                args[0] = hostName;
+                args[0] = RequestUtil.filter(hostName);
                 String[] aliases = host.findAliases();
                 StringBuffer buf = new StringBuffer();
                 if (aliases.length > 0) {
@@ -265,9 +267,11 @@
 
                 if (buf.length() == 0) {
                     buf.append("&nbsp;");
+                    args[1] = buf.toString();
+                } else {
+                    args[1] = RequestUtil.filter(buf.toString());
                 }
 
-                args[1] = buf.toString();
                 writer.print
                     (MessageFormat.format(HOSTS_ROW_DETAILS_SECTION, args));
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message