db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1504760 - in /db/derby/code/branches/10.8: ./ java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Date Fri, 19 Jul 2013 04:09:15 GMT
Author: mamta
Date: Fri Jul 19 04:09:15 2013
New Revision: 1504760

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

Backporting to 10.8. Fix contributed by Kathey


Modified:
    db/derby/code/branches/10.8/   (props changed)
    db/derby/code/branches/10.8/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java

Propchange: db/derby/code/branches/10.8/
------------------------------------------------------------------------------
  Merged /db/derby/code/branches/10.9:r1504520

Modified: db/derby/code/branches/10.8/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java?rev=1504760&r1=1504759&r2=1504760&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
(original)
+++ db/derby/code/branches/10.8/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Fri Jul 19 04:09:15 2013
@@ -1255,13 +1255,20 @@ public final class NetworkServerControlI
 		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()});
+        }	
+    }
 
 
 	/**
@@ -3540,7 +3547,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