[Jboss-cvs] JBossAS SVN: r56890 - branches/Branch_4_0/cluster/src/main/org/jboss/ha/framework/server

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Sep 15 12:16:41 EDT 2006


Author: bstansberry at jboss.com
Date: 2006-09-15 12:16:40 -0400 (Fri, 15 Sep 2006)
New Revision: 56890

Modified:
   branches/Branch_4_0/cluster/src/main/org/jboss/ha/framework/server/ClusterFileTransfer.java
Log:
Don't disguise non-response to open call as an ArrayIndexOutOfBoundsException

Modified: branches/Branch_4_0/cluster/src/main/org/jboss/ha/framework/server/ClusterFileTransfer.java
===================================================================
--- branches/Branch_4_0/cluster/src/main/org/jboss/ha/framework/server/ClusterFileTransfer.java	2006-09-15 16:15:09 UTC (rev 56889)
+++ branches/Branch_4_0/cluster/src/main/org/jboss/ha/framework/server/ClusterFileTransfer.java	2006-09-15 16:16:40 UTC (rev 56890)
@@ -98,6 +98,11 @@
             new Object[]{file, myNodeName, myNodeAddress,  parentName}, new Class[]{java.io.File.class, java.lang.String.class,ClusterNode.class, java.lang.String.class},
             true);
 
+         if (response == null || response.size() < 1)
+         {
+            throw new ClusterFileTransferException("Did not receive response from remote machine trying to open file '" + file + "'.  Check remote machine error log.");
+         }
+         
          FileContentChunk fileChunk = (FileContentChunk) response.get(0);
          if(null == fileChunk)
          {
@@ -119,8 +124,8 @@
             if (response.size() < 1)
             {
                if(! tempFile.delete())
-                  throw new ClusterFileTransferException("An error occured on remote machine trying to read file '" + file + "'.  Is remote still running?.  Also, we couldn't delete temp file "+ tempFile.getName());
-               throw new ClusterFileTransferException("An error occured on remote machine trying to read file '" + file + "'.  Is remote still running?.");
+                  throw new ClusterFileTransferException("An error occured on remote machine trying to read file '" + file + "'.  Is remote still running?  Also, we couldn't delete temp file "+ tempFile.getName());
+               throw new ClusterFileTransferException("An error occured on remote machine trying to read file '" + file + "'.  Is remote still running?");
             }
             fileChunk = (FileContentChunk) response.get(0);
             if (null == fileChunk)




More information about the jboss-cvs-commits mailing list