mx4j/src/core/javax/management/remote JMXServiceURL.java,1.9,1.10

Simone Bordet <[email protected]>
Newsgroups gmane.comp.java.mx4j.cvs
Message-ID <[email protected]>
Update of /cvsroot/mx4j/mx4j/src/core/javax/management/remote
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30177/src/core/javax/management/remote

Modified Files:
	JMXServiceURL.java 
Log Message:
Bug fix: the host must not be case sensitive

Index: JMXServiceURL.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/javax/management/remote/JMXServiceURL.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** JMXServiceURL.java	18 Jul 2004 21:18:59 -0000	1.9
--- JMXServiceURL.java	20 Jul 2004 13:09:56 -0000	1.10
***************
*** 23,33 ****
     private static final long serialVersionUID = 8173364409860779292l;
  
!    /** @serial The protocol */
     private String protocol;
!    /** @serial The host */
     private String host;
!    /** @serial The port */
     private int port;
!    /** @serial The path */
     private String urlPath;
  
--- 23,41 ----
     private static final long serialVersionUID = 8173364409860779292l;
  
!    /**
!     * @serial The protocol
!     */
     private String protocol;
!    /**
!     * @serial The host
!     */
     private String host;
!    /**
!     * @serial The port
!     */
     private int port;
!    /**
!     * @serial The path
!     */
     private String urlPath;
  
***************
*** 57,64 ****
     private String resolveHost() throws MalformedURLException
     {
-       String host;
        try
        {
!          host = InetAddress.getLocalHost().getHostName();
        }
        catch (UnknownHostException x)
--- 65,71 ----
     private String resolveHost() throws MalformedURLException
     {
        try
        {
!          return InetAddress.getLocalHost().getHostName();
        }
        catch (UnknownHostException x)
***************
*** 66,70 ****
           throw new MalformedURLException("Cannot resolve local host name");
        }
-       return host;
     }
  
--- 73,76 ----
***************
*** 92,96 ****
           this.host = host.toLowerCase();
        else
!          this.host = resolveHost(); // Default required by the spec
     }
  
--- 98,102 ----
           this.host = host.toLowerCase();
        else
!          this.host = resolveHost().toLowerCase(); // Default required by the spec
     }
  



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.