tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r719136 - /tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
Date Thu, 20 Nov 2008 00:10:48 GMT
Author: markt
Date: Wed Nov 19 16:10:48 2008
New Revision: 719136

URL: http://svn.apache.org/viewvc?rev=719136&view=rev
Log:
Relax generics checks otherwise an call with a Properties object will not compile.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=719136&r1=719135&r2=719136&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Wed Nov 19 16:10:48 2008
@@ -472,7 +472,7 @@
      * Replace ${NAME} with the property value
      */
     public static String replaceProperties(String value,
-            Hashtable<String,String> staticProp, PropertySource dynamicProp[]) {
+            Hashtable<Object,Object> staticProp, PropertySource dynamicProp[]) {
         if (value.indexOf("$") < 0) {
             return value;
         }
@@ -500,7 +500,7 @@
                 String n = value.substring(pos + 2, endName);
                 String v = null;
                 if (staticProp != null) {
-                    v = staticProp.get(n);
+                    v = (String) staticProp.get(n);
                 }
                 if (v == null && dynamicProp != null) {
                     for (int i = 0; i < dynamicProp.length; i++) {
@@ -716,10 +716,10 @@
             //args0=findVoidSetters(proxy.getClass());
             args0 = findBooleanSetters(proxy.getClass());
         }
-        Hashtable<String,String> h = null;
+        Hashtable<Object,Object> h = null;
         if (null != findMethod(proxy.getClass(), "getOptionAliases",
                 new Class[] {})) {
-            h = (Hashtable<String,String>) callMethod0(proxy,
+            h = (Hashtable<Object,Object>) callMethod0(proxy,
                     "getOptionAliases");
         }
         return processArgs(proxy, args, args0, null, h);
@@ -727,13 +727,13 @@
 
     public static boolean processArgs(Object proxy, String args[],
             String args0[], String args1[],
-            Hashtable<String,String> aliases) throws Exception {
+            Hashtable<Object,Object> aliases) throws Exception {
         for (int i = 0; i < args.length; i++) {
             String arg = args[i];
             if (arg.startsWith("-"))
                 arg = arg.substring(1);
             if (aliases != null && aliases.get(arg) != null)
-                arg = aliases.get(arg);
+                arg = (String) aliases.get(arg);
 
             if (args0 != null) {
                 boolean set = false;



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


Mime
View raw message