james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r451940 - in /james/server/trunk/src/java/org/apache/james: dnsserver/DNSServer.java services/DNSServer.java
Date Mon, 02 Oct 2006 10:03:15 GMT
Author: norman
Date: Mon Oct  2 03:03:12 2006
New Revision: 451940

URL: http://svn.apache.org/viewvc?view=rev&rev=451940
Log:
Change behavoir of getHostName(InetAddress adrr) to return the ipAddress if the hostname can
not be found

Modified:
    james/server/trunk/src/java/org/apache/james/dnsserver/DNSServer.java
    james/server/trunk/src/java/org/apache/james/services/DNSServer.java

Modified: james/server/trunk/src/java/org/apache/james/dnsserver/DNSServer.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/dnsserver/DNSServer.java?view=diff&rev=451940&r1=451939&r2=451940
==============================================================================
--- james/server/trunk/src/java/org/apache/james/dnsserver/DNSServer.java (original)
+++ james/server/trunk/src/java/org/apache/james/dnsserver/DNSServer.java Mon Oct  2 03:03:12
2006
@@ -535,8 +535,12 @@
     /**
      * @see org.apache.james.services.DNSServer#getHostName(java.net.InetAddress)
      */
-    public String getHostName(InetAddress addr) throws UnknownHostException {
-        return org.xbill.DNS.Address.getHostName(addr);
+    public String getHostName(InetAddress addr){
+	try {
+            return org.xbill.DNS.Address.getHostName(addr);
+	} catch (UnknownHostException e) {
+	    return addr.getHostAddress();
+	}
     }
 
 }

Modified: james/server/trunk/src/java/org/apache/james/services/DNSServer.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/services/DNSServer.java?view=diff&rev=451940&r1=451939&r2=451940
==============================================================================
--- james/server/trunk/src/java/org/apache/james/services/DNSServer.java (original)
+++ james/server/trunk/src/java/org/apache/james/services/DNSServer.java Mon Oct  2 03:03:12
2006
@@ -94,5 +94,5 @@
     /**
      * @see org.xbill.DNS.Address#getHostName(InetAddress)
      */
-    public String getHostName(InetAddress addr) throws UnknownHostException;
+    public String getHostName(InetAddress addr);
 }



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


Mime
View raw message