Author: jfrederic.clere(a)jboss.com
Date: 2008-10-29 05:42:22 -0400 (Wed, 29 Oct 2008)
New Revision: 2018
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/Utils.java
Log:
tc-6.0.x has already a String.
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/Utils.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/Utils.java 2008-10-28 23:36:28
UTC (rev 2017)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/Utils.java 2008-10-29 09:42:22
UTC (rev 2018)
@@ -94,7 +94,12 @@
*/
public static String getAddress(Connector connector)
{
- InetAddress inetAddress = (InetAddress)
IntrospectionUtils.getProperty(connector.getProtocolHandler(), "address");
+ Object address = IntrospectionUtils.getProperty(connector.getProtocolHandler(),
"address");
+ InetAddress inetAddress = null;
+ if (address instanceof String)
+ return (String) address;
+ else
+ inetAddress = (InetAddress) address;
return (inetAddress != null) ? inetAddress.getHostAddress() :
"127.0.0.1";
}