db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1183463 - /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Date Fri, 14 Oct 2011 19:17:03 GMT
Author: rhillegas
Date: Fri Oct 14 19:17:03 2011
New Revision: 1183463

URL: http://svn.apache.org/viewvc?rev=1183463&view=rev
Log:
DERBY-5456: Make the network server more diligent about collecting up all of the local addresses
which it can.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java?rev=1183463&r1=1183462&r2=1183463&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
(original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Fri Oct 14 19:17:03 2011
@@ -2641,20 +2641,24 @@ public final class NetworkServerControlI
 	 **/
 	private void buildLocalAddressList(InetAddress bindAddr) 
 	{
-			localAddresses = new ArrayList(3);
-			localAddresses.add(bindAddr);
-			try {
-				localAddresses.add(InetAddress.getLocalHost());
-				localAddresses.add(InetAddress.getByName("localhost"));
-			}catch(UnknownHostException uhe)
-			{
-				try {
-					consolePropertyMessage("DRDA_UnknownHostWarning.I",uhe.getMessage());
-				} catch (Exception e)
-				{ // just a warning shouldn't actually throw an exception
-				}
-			}			
+        localAddresses = new ArrayList(3);
+        localAddresses.add(bindAddr);
+        
+        try { localAddresses.add(InetAddress.getLocalHost()); }
+        catch(UnknownHostException uhe) { unknownHostException( uhe ); }
+        
+        try { localAddresses.add(InetAddress.getByName("localhost")); }
+        catch(UnknownHostException uhe) { unknownHostException( uhe ); }
 	}
+    private void unknownHostException( Throwable t )
+    {
+        try {
+            consolePropertyMessage( "DRDA_UnknownHostWarning.I", t.getMessage() );
+        } catch (Exception e)
+        { 
+            // just a warning shouldn't actually throw an exception
+        }
+    }
 	
 	/**
 	 * Routines for writing commands for NetworkServerControlImpl being used as a client



Mime
View raw message