Fix various Eclipse warnings.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 9 Feb 2009 19:53:28 +0000 (19:53 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 9 Feb 2009 19:53:28 +0000 (19:53 +0000)
Convert tabs to spaces.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@742708 13f79535-47bb-0310-9956-ffa450edef68

21 files changed:
test/org/apache/catalina/tribes/demos/CoordinationDemo.java
test/org/apache/catalina/tribes/demos/EchoRpcTest.java
test/org/apache/catalina/tribes/demos/IntrospectionUtils.java
test/org/apache/catalina/tribes/demos/LoadTest.java
test/org/apache/catalina/tribes/demos/MapDemo.java
test/org/apache/catalina/tribes/test/TestNioSender.java
test/org/apache/catalina/tribes/test/channel/ChannelStartStop.java
test/org/apache/catalina/tribes/test/channel/TestChannelOptionFlag.java
test/org/apache/catalina/tribes/test/channel/TestDataIntegrity.java
test/org/apache/catalina/tribes/test/channel/TestMulticastPackages.java
test/org/apache/catalina/tribes/test/channel/TestRemoteProcessException.java
test/org/apache/catalina/tribes/test/channel/TestUdpPackages.java
test/org/apache/catalina/tribes/test/interceptors/TestNonBlockingCoordinator.java
test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java
test/org/apache/catalina/tribes/test/io/TestSenderConnections.java
test/org/apache/catalina/tribes/test/membership/TestDomainFilter.java
test/org/apache/catalina/tribes/test/membership/TestMemberArrival.java
test/org/apache/catalina/tribes/test/membership/TestTcpFailureDetector.java
test/org/apache/catalina/tribes/test/transport/SocketReceive.java
test/org/apache/catalina/tribes/test/transport/SocketTribesReceive.java
test/org/apache/catalina/tribes/test/transport/SocketValidateReceive.java

index 94ae8d6..8668da3 100644 (file)
@@ -46,6 +46,7 @@ public class CoordinationDemo {
      * Construct and show the application.
      */
     public CoordinationDemo() {
+        // Default constructor
     }
     
     public void init() {
@@ -312,7 +313,9 @@ public class CoordinationDemo {
                 status = "Start failed:"+x.getMessage();
                 error = x;
                 startstatus = "failed";
-                try { channel.stop(GroupChannel.DEFAULT);}catch(Exception ignore){}
+                try { channel.stop(Channel.DEFAULT);}catch(Exception ignore){
+                    // Ignore
+                }
                 channel = null;
                 interceptor = null;
             }
@@ -351,7 +354,9 @@ public class CoordinationDemo {
                     int type = event.getEventType();
                     boolean display = VIEW_EVENTS[type];
                     if ( display ) parent.printScreen();
-                    try { Thread.sleep(SLEEP_TIME); }catch ( Exception x){}
+                    try { Thread.sleep(SLEEP_TIME); }catch ( Exception x){
+                        // Ignore
+                    }
                 }
             };
             channel.addInterceptor(interceptor);
index 7dac0d7..22ce161 100644 (file)
@@ -96,8 +96,10 @@ public class EchoRpcTest implements RpcCallback, Runnable {
                 for ( int i=0; i<resp.length; i++ ) {
                     System.out.println("Received a response message from ["+resp[i].getSource().getName()+"] with data ["+resp[i].getMessage()+"]");
                 }
-            Thread.sleep(pause);
-        }catch(Exception x){}
+                Thread.sleep(pause);
+            }catch(Exception x){
+                // Ignore
+            }
         }
     }
     
index 6a6a538..ac3f60a 100644 (file)
@@ -957,6 +957,7 @@ public final class IntrospectionUtils {
             try {
                 result = new Integer(object);
             } catch (NumberFormatException ex) {
+                // Ignore
             }
             // Try a setFoo ( boolean )
         } else if ("java.lang.Boolean".equals(paramType.getName())
index 0f2fe50..35cb795 100644 (file)
@@ -248,8 +248,7 @@ public class LoadTest implements MembershipListener,ChannelListener, Runnable {
 
     
     
-    //public static class LoadMessage implements Serializable  {
-    public static class LoadMessage extends ByteMessage  implements Serializable {
+    public static class LoadMessage extends ByteMessage {
         
         public static byte[] outdata = new byte[size];
         public static Random r = new Random(System.currentTimeMillis());
@@ -263,6 +262,7 @@ public class LoadTest implements MembershipListener,ChannelListener, Runnable {
         protected byte[] message = getMessage();
         
         public LoadMessage() {
+            // Default constructor
         }
         
         public byte[] getMessage() {
index 40761e8..0f67e88 100644 (file)
@@ -94,17 +94,19 @@ public class MapDemo implements ChannelListener, MembershipListener{
     
     /**
      * Invoked if accept returns true.
-     * No of for now
+     * No op for now
      * @param msg - the message received
      * @param source - the sending member
      */
     public void messageReceived(Serializable msg, Member source) {
+        // NOOP
     }
     
     /**
      * Invoked when a member is added to the group
      */
     public void memberAdded(Member member) {
+        // NOOP
     }
     
     /**
index 40b9433..277a9f2 100644 (file)
@@ -42,7 +42,7 @@ public class TestNioSender {
     MemberImpl mbr;
     private static int testOptions = Channel.SEND_OPTIONS_DEFAULT;
     public TestNioSender()  {
-        
+        // Default constructor
     }
     
     public synchronized int inc() {
index 92030d6..7828e70 100644 (file)
@@ -34,7 +34,7 @@ public class ChannelStartStop extends TestCase {
 
     protected void tearDown() throws Exception {
         super.tearDown();
-        try {channel.stop(Channel.DEFAULT);}catch (Exception ignore){}
+        try {channel.stop(Channel.DEFAULT);}catch (Exception ignore){ /* Ignore */ }
     }
 
     public void testDoubleFullStart() throws Exception {
index ed14272..6595f33 100644 (file)
@@ -41,7 +41,7 @@ public class TestChannelOptionFlag extends TestCase {
 
     protected void tearDown() throws Exception {
         super.tearDown();
-        if ( channel != null ) try {channel.stop(Channel.DEFAULT);}catch ( Exception ignore) {}
+        if ( channel != null ) try {channel.stop(Channel.DEFAULT);}catch ( Exception ignore) { /* Ignore */ }
         channel = null;
     }
     
@@ -84,7 +84,7 @@ public class TestChannelOptionFlag extends TestCase {
     }
     
     public static class TestInterceptor extends ChannelInterceptorBase {
-        
+        // Just use base class
     }
 
 
index 57fd9b7..63a71b4 100644 (file)
@@ -20,6 +20,8 @@ import junit.framework.TestCase;
 import java.io.Serializable;
 import java.util.Random;
 import java.util.Arrays;
+
+import org.apache.catalina.tribes.Channel;
 import org.apache.catalina.tribes.ChannelListener;
 import org.apache.catalina.tribes.Member;
 import org.apache.catalina.tribes.group.GroupChannel;
@@ -50,14 +52,14 @@ public class TestDataIntegrity extends TestCase {
         channel2.addInterceptor(new MessageDispatch15Interceptor());
         listener1 = new Listener();
         channel2.addChannelListener(listener1);
-        channel1.start(GroupChannel.DEFAULT);
-        channel2.start(GroupChannel.DEFAULT);
+        channel1.start(Channel.DEFAULT);
+        channel2.start(Channel.DEFAULT);
     }
 
     protected void tearDown() throws Exception {
         super.tearDown();
-        channel1.stop(GroupChannel.DEFAULT);
-        channel2.stop(GroupChannel.DEFAULT);
+        channel1.stop(Channel.DEFAULT);
+        channel2.stop(Channel.DEFAULT);
     }
 
     public void testDataSendNO_ACK() throws Exception {
@@ -96,7 +98,7 @@ public class TestDataIntegrity extends TestCase {
                     public void run() {
                         try {
                             long start = System.currentTimeMillis();
-                            for (int i = 0; i < msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)}, Data.createRandomData(),GroupChannel.SEND_OPTIONS_ASYNCHRONOUS);
+                            for (int i = 0; i < msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)}, Data.createRandomData(),Channel.SEND_OPTIONS_ASYNCHRONOUS);
                             System.out.println("Thread["+this.getName()+"] sent "+msgCount+" messages in "+(System.currentTimeMillis()-start)+" ms.");
                         }catch ( Exception x ) {
                             x.printStackTrace();
@@ -117,7 +119,7 @@ public class TestDataIntegrity extends TestCase {
     }
     public void testDataSendASYNC() throws Exception {
         System.err.println("Starting ASYNC");
-        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(),GroupChannel.SEND_OPTIONS_ASYNCHRONOUS);
+        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(),Channel.SEND_OPTIONS_ASYNCHRONOUS);
         //sleep for 50 sec, let the other messages in
         long start = System.currentTimeMillis();
         while ( (System.currentTimeMillis()-start)<5000 && msgCount!=listener1.count) Thread.sleep(500);
@@ -127,7 +129,7 @@ public class TestDataIntegrity extends TestCase {
 
     public void testDataSendACK() throws Exception {
         System.err.println("Starting ACK");
-        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(),GroupChannel.SEND_OPTIONS_USE_ACK);
+        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(),Channel.SEND_OPTIONS_USE_ACK);
         Thread.sleep(250);
         System.err.println("Finished ACK");
         assertEquals("Checking success messages.",msgCount,listener1.count);
@@ -135,7 +137,7 @@ public class TestDataIntegrity extends TestCase {
 
     public void testDataSendSYNCACK() throws Exception {
         System.err.println("Starting SYNC_ACK");
-        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(),GroupChannel.SEND_OPTIONS_SYNCHRONIZED_ACK|GroupChannel.SEND_OPTIONS_USE_ACK);
+        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(),Channel.SEND_OPTIONS_SYNCHRONIZED_ACK|Channel.SEND_OPTIONS_USE_ACK);
         Thread.sleep(250);
         System.err.println("Finished SYNC_ACK");
         assertEquals("Checking success messages.",msgCount,listener1.count);
index 5780359..4074a45 100644 (file)
@@ -62,14 +62,14 @@ public class TestMulticastPackages extends TestCase {
         rb1.setUdpPort(50000);
         rb2.setUdpPort(50000);
         channel2.addChannelListener(listener1);
-        channel1.start(GroupChannel.DEFAULT);
-        channel2.start(GroupChannel.DEFAULT);
+        channel1.start(Channel.DEFAULT);
+        channel2.start(Channel.DEFAULT);
     }
 
     protected void tearDown() throws Exception {
         super.tearDown();
-        channel1.stop(GroupChannel.DEFAULT);
-        channel2.stop(GroupChannel.DEFAULT);
+        channel1.stop(Channel.DEFAULT);
+        channel2.stop(Channel.DEFAULT);
     }
 
     public void testSingleDataSendNO_ACK() throws Exception {
@@ -136,7 +136,7 @@ public class TestMulticastPackages extends TestCase {
     }
     public void testDataSendASYNC() throws Exception {
         System.err.println("Starting ASYNC");
-        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(1024),GroupChannel.SEND_OPTIONS_ASYNCHRONOUS|Channel.SEND_OPTIONS_MULTICAST);
+        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(1024),Channel.SEND_OPTIONS_ASYNCHRONOUS|Channel.SEND_OPTIONS_MULTICAST);
         //sleep for 50 sec, let the other messages in
         long start = System.currentTimeMillis();
         while ( (System.currentTimeMillis()-start)<5000 && msgCount!=listener1.count.get()) Thread.sleep(500);
@@ -146,7 +146,7 @@ public class TestMulticastPackages extends TestCase {
 
     public void testDataSendACK() throws Exception {
         System.err.println("Starting ACK");
-        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(1024),GroupChannel.SEND_OPTIONS_USE_ACK|Channel.SEND_OPTIONS_MULTICAST);
+        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(1024),Channel.SEND_OPTIONS_USE_ACK|Channel.SEND_OPTIONS_MULTICAST);
         Thread.sleep(250);
         System.err.println("Finished ACK");
         assertEquals("Checking success messages.",msgCount,listener1.count.get());
@@ -154,7 +154,7 @@ public class TestMulticastPackages extends TestCase {
 
     public void testDataSendSYNCACK() throws Exception {
         System.err.println("Starting SYNC_ACK");
-        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(1024),GroupChannel.SEND_OPTIONS_SYNCHRONIZED_ACK|GroupChannel.SEND_OPTIONS_USE_ACK|Channel.SEND_OPTIONS_MULTICAST);
+        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(1024),Channel.SEND_OPTIONS_SYNCHRONIZED_ACK|Channel.SEND_OPTIONS_USE_ACK|Channel.SEND_OPTIONS_MULTICAST);
         Thread.sleep(250);
         System.err.println("Finished SYNC_ACK");
         assertEquals("Checking success messages.",msgCount,listener1.count.get());
index 00403d0..ac8c22f 100644 (file)
@@ -20,6 +20,8 @@ import junit.framework.TestCase;
 import java.io.Serializable;
 import java.util.Random;
 import java.util.Arrays;
+
+import org.apache.catalina.tribes.Channel;
 import org.apache.catalina.tribes.ChannelListener;
 import org.apache.catalina.tribes.Member;
 import org.apache.catalina.tribes.group.GroupChannel;
@@ -46,14 +48,14 @@ public class TestRemoteProcessException extends TestCase {
         channel2 = new GroupChannel();
         listener1 = new Listener();
         channel2.addChannelListener(listener1);
-        channel1.start(GroupChannel.DEFAULT);
-        channel2.start(GroupChannel.DEFAULT);
+        channel1.start(Channel.DEFAULT);
+        channel2.start(Channel.DEFAULT);
     }
 
     protected void tearDown() throws Exception {
         super.tearDown();
-        channel1.stop(GroupChannel.DEFAULT);
-        channel2.stop(GroupChannel.DEFAULT);
+        channel1.stop(Channel.DEFAULT);
+        channel2.stop(Channel.DEFAULT);
     }
 
     public void testDataSendSYNCACK() throws Exception {
@@ -61,7 +63,7 @@ public class TestRemoteProcessException extends TestCase {
         int errC=0, nerrC=0;
         for (int i=0; i<msgCount; i++) {
             boolean error = Data.r.nextBoolean();
-            channel1.send(channel1.getMembers(),Data.createRandomData(error),GroupChannel.SEND_OPTIONS_SYNCHRONIZED_ACK|GroupChannel.SEND_OPTIONS_USE_ACK);
+            channel1.send(channel1.getMembers(),Data.createRandomData(error),Channel.SEND_OPTIONS_SYNCHRONIZED_ACK|Channel.SEND_OPTIONS_USE_ACK);
             if ( error ) errC++; else nerrC++;
         }
         System.err.println("Finished SYNC_ACK");
@@ -90,11 +92,10 @@ public class TestRemoteProcessException extends TestCase {
                         printStats(System.err);
                     }
                     throw new IllegalArgumentException();
-                } else {
-                    noErrCnt++;
-                    if ( (noErrCnt % 100) == 0) {
-                        printStats(System.err);
-                    }
+                }
+                noErrCnt++;
+                if ( (noErrCnt % 100) == 0) {
+                    printStats(System.err);
                 }
             }
         }
index 3d48859..5ed1b9a 100644 (file)
@@ -62,14 +62,14 @@ public class TestUdpPackages extends TestCase {
         rb1.setUdpPort(50000);
         rb2.setUdpPort(50000);
         channel2.addChannelListener(listener1);
-        channel1.start(GroupChannel.DEFAULT);
-        channel2.start(GroupChannel.DEFAULT);
+        channel1.start(Channel.DEFAULT);
+        channel2.start(Channel.DEFAULT);
     }
 
     protected void tearDown() throws Exception {
         super.tearDown();
-        channel1.stop(GroupChannel.DEFAULT);
-        channel2.stop(GroupChannel.DEFAULT);
+        channel1.stop(Channel.DEFAULT);
+        channel2.stop(Channel.DEFAULT);
     }
 
     public void testSingleDataSendNO_ACK() throws Exception {
@@ -178,7 +178,7 @@ public class TestUdpPackages extends TestCase {
     }
     public void testDataSendASYNC() throws Exception {
         System.err.println("Starting ASYNC");
-        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(1024),GroupChannel.SEND_OPTIONS_ASYNCHRONOUS|Channel.SEND_OPTIONS_UDP);
+        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(1024),Channel.SEND_OPTIONS_ASYNCHRONOUS|Channel.SEND_OPTIONS_UDP);
         //sleep for 50 sec, let the other messages in
         long start = System.currentTimeMillis();
         while ( (System.currentTimeMillis()-start)<5000 && msgCount!=listener1.count.get()) Thread.sleep(500);
@@ -188,7 +188,7 @@ public class TestUdpPackages extends TestCase {
 
     public void testDataSendACK() throws Exception {
         System.err.println("Starting ACK");
-        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(1024),GroupChannel.SEND_OPTIONS_USE_ACK|Channel.SEND_OPTIONS_UDP);
+        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(1024),Channel.SEND_OPTIONS_USE_ACK|Channel.SEND_OPTIONS_UDP);
         Thread.sleep(250);
         System.err.println("Finished ACK");
         assertEquals("Checking success messages.",msgCount,listener1.count.get());
@@ -196,7 +196,7 @@ public class TestUdpPackages extends TestCase {
 
     public void testDataSendSYNCACK() throws Exception {
         System.err.println("Starting SYNC_ACK");
-        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(1024),GroupChannel.SEND_OPTIONS_SYNCHRONIZED_ACK|GroupChannel.SEND_OPTIONS_USE_ACK|Channel.SEND_OPTIONS_UDP);
+        for (int i=0; i<msgCount; i++) channel1.send(new Member[] {channel2.getLocalMember(false)},Data.createRandomData(1024),Channel.SEND_OPTIONS_SYNCHRONIZED_ACK|Channel.SEND_OPTIONS_USE_ACK|Channel.SEND_OPTIONS_UDP);
         Thread.sleep(250);
         System.err.println("Finished SYNC_ACK");
         assertEquals("Checking success messages.",msgCount,listener1.count.get());
index c3f6745..10dd2e8 100644 (file)
@@ -64,8 +64,8 @@ public class TestNonBlockingCoordinator extends TestCase {
             assertEquals("Message count expected to be equal.",channels[i-1].getMembers().length,channels[i].getMembers().length);
         Member member = coordinators[0].getCoordinator();
         int cnt = 0;
-        while ( member == null && (cnt++ < 100 ) ) try {Thread.sleep(100); member = coordinators[0].getCoordinator();}catch ( Exception x){}
-        for (int i=0; i<channelCount; i++ ) super.assertEquals(member,coordinators[i].getCoordinator());
+        while ( member == null && (cnt++ < 100 ) ) try {Thread.sleep(100); member = coordinators[0].getCoordinator();}catch ( Exception x){ /* Ignore */ }
+        for (int i=0; i<channelCount; i++ ) assertEquals(member,coordinators[i].getCoordinator());
         System.out.println("Coordinator[1] is:"+member);
         
     }
@@ -86,7 +86,7 @@ public class TestNonBlockingCoordinator extends TestCase {
         if ( index == 0 ) index = 1; else index = 0;
         System.out.println("Member count:"+channels[index].getMembers().length);
         member = coordinators[index].getCoordinator();
-        for (int i = 1; i < channelCount; i++) if ( i != dead ) super.assertEquals(member, coordinators[i].getCoordinator());
+        for (int i = 1; i < channelCount; i++) if ( i != dead ) assertEquals(member, coordinators[i].getCoordinator());
         System.out.println("Coordinator[2b] is:" + member);
     }
 
index 2d168fb..c88533d 100644 (file)
@@ -82,7 +82,7 @@ public class TestOrderInterceptor extends TestCase {
         }
         Thread.sleep(5000);
         for ( int i=0; i<test.length; i++ ) {
-            super.assertEquals(false,test[i].fail);
+            assertEquals(false,test[i].fail);
         }
     }
     
@@ -115,7 +115,7 @@ public class TestOrderInterceptor extends TestCase {
         }
         Thread.sleep(5000);
         for ( int i=0; i<test.length; i++ ) {
-            super.assertEquals(false,test[i].fail);
+            assertEquals(false,test[i].fail);
         }
     }
 
index 6e9a7a6..ea9c286 100644 (file)
@@ -47,6 +47,7 @@ public class TestSenderConnections extends TestCase {
     }
 
     public void clear() {
+        // NOOP
     }
 
     public void sendMessages(long delay, long sleep) throws Exception {
index 7a0419c..0239fcc 100644 (file)
@@ -80,7 +80,9 @@ public class TestDomainFilter
         for (int i = 0; i < channels.length; i++) {
             try {
                 channels[i].stop(Channel.DEFAULT);
-            } catch (Exception ignore) {}
+            } catch (Exception ignore) {
+                // Ignore
+            }
         }
         super.tearDown();
     }
index 79d7433..e74af4c 100644 (file)
@@ -77,7 +77,9 @@ public class TestMemberArrival
         for (int i = 0; i < channels.length; i++) {
             try {
                 channels[i].stop(Channel.DEFAULT);
-            } catch (Exception ignore) {}
+            } catch (Exception ignore) {
+                // Ignore
+            }
         }
         super.tearDown();
     }
index 53be5c6..e0600db 100644 (file)
@@ -79,7 +79,7 @@ public class TestTcpFailureDetector extends TestCase {
             channel1.send(channel1.getMembers(), msg, 0);
             assertEquals("Message send should have failed.",true,false);
         } catch ( ChannelException x ) {
-            
+            // Ignore
         }
         assertEquals("Expecting member count to not be equal",mbrlist1.members.size()+1,mbrlist2.members.size());
         channel1.stop(Channel.DEFAULT);
@@ -125,9 +125,9 @@ public class TestTcpFailureDetector extends TestCase {
     protected void tearDown() throws Exception {
         tcpFailureDetector1 = null;
         tcpFailureDetector2 = null;
-        try { channel1.stop(Channel.DEFAULT);}catch (Exception ignore){}
+        try { channel1.stop(Channel.DEFAULT);}catch (Exception ignore){ /* Ignore */ }
         channel1 = null;
-        try { channel2.stop(Channel.DEFAULT);}catch (Exception ignore){}
+        try { channel2.stop(Channel.DEFAULT);}catch (Exception ignore){ /* Ignore */ }
         channel2 = null;
         super.tearDown();
     }
index db9473d..1619b25 100644 (file)
@@ -46,7 +46,9 @@ public class SocketReceive {
                     try {
                         Thread.sleep(1000);
                         printStats(start, mb, count, df, total);
-                    }catch ( Exception x ) {}
+                    }catch ( Exception x ) {
+                        // Ignore
+                    }
                 }
             }
         };
index fd9ae84..e4b0555 100644 (file)
@@ -37,7 +37,7 @@ public class SocketTribesReceive {
     
     public static void main(String[] args) throws Exception {
         int size = 43800;
-        if (args.length > 0 ) try {size=Integer.parseInt(args[0]);}catch(Exception x){}
+        if (args.length > 0 ) try {size=Integer.parseInt(args[0]);}catch(Exception x){ /* Ignore */ }
         XByteBuffer xbuf = new XByteBuffer(43800,true);
         ServerSocket srvSocket = new ServerSocket(9999);
         System.out.println("Listening on 9999");
@@ -50,7 +50,7 @@ public class SocketTribesReceive {
                     try {
                         Thread.sleep(1000);
                         printStats(start, mb, count, df, total);
-                    }catch ( Exception x ) {}
+                    }catch ( Exception x ) { /* Ignore */ }
                 }
             }
         };
index 4c3fe40..e6193be 100644 (file)
@@ -35,7 +35,7 @@ public class SocketValidateReceive {
     
     public static void main(String[] args) throws Exception {
         int size = 43800;
-        if (args.length > 0 ) try {size=Integer.parseInt(args[0]);}catch(Exception x){}
+        if (args.length > 0 ) try {size=Integer.parseInt(args[0]);}catch(Exception x){ /* Ignore */ }
    
         ServerSocket srvSocket = new ServerSocket(9999);
         System.out.println("Listening on 9999");
@@ -49,7 +49,7 @@ public class SocketValidateReceive {
                     try {
                         Thread.sleep(1000);
                         printStats(start, mb, count, df, total);
-                    }catch ( Exception x ) {}
+                    }catch ( Exception x ) { /* Ignore */ }
                 }
             }
         };