db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1484507 - /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Date Mon, 20 May 2013 15:49:26 GMT
Author: kmarsden
Date: Mon May 20 15:49:26 2013
New Revision: 1484507

URL: http://svn.apache.org/r1484507
Log:
DERBY-5610 ServerPropertiesTest prints .java.net.SocketException: Connection reset to console
but test passes 


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=1484507&r1=1484506&r2=1484507&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
Mon May 20 15:49:26 2013
@@ -1261,13 +1261,19 @@ public final class NetworkServerControlI
         String user = null;
         String password = null;
 
-            
-            writeCommandHeader(COMMAND_TESTCONNECTION);
-            writeLDString(database);
-            writeLDString(user);
-            writeLDString(password);
-            send();
-            readResult();
+            try {
+                writeCommandHeader(COMMAND_TESTCONNECTION);
+                writeLDString(database);
+                writeLDString(user);
+                writeLDString(password);
+                send();
+                readResult();
+            } catch (IOException ioe) {
+                consolePropertyMessage("DRDA_NoIO.S",
+                        new String [] {hostArg, 
+                        (new Integer(portNumber)).toString(), 
+                        ioe.getMessage()}); 
+            }
     }
 
 
@@ -3553,7 +3559,7 @@ public final class NetworkServerControlI
      */
     private boolean isMsgProperty(String msg)
     {
-        if (msg.startsWith(DRDA_MSG_PREFIX))
+        if (msg != null && msg.startsWith(DRDA_MSG_PREFIX))
             return true;
         else
             return false;



Mime
View raw message