commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1697295 - in /commons/proper/net/trunk/src: main/java/examples/unix/ main/java/examples/util/ main/java/org/apache/commons/net/ main/java/org/apache/commons/net/ftp/ main/java/org/apache/commons/net/io/ main/java/org/apache/commons/net/tel...
Date Mon, 24 Aug 2015 01:27:54 GMT
Author: sebb
Date: Mon Aug 24 01:27:54 2015
New Revision: 1697295

URL: http://svn.apache.org/r1697295
Log:
Empty Catch Blocks

Modified:
    commons/proper/net/trunk/src/main/java/examples/unix/rexec.java
    commons/proper/net/trunk/src/main/java/examples/unix/rlogin.java
    commons/proper/net/trunk/src/main/java/examples/unix/rshell.java
    commons/proper/net/trunk/src/main/java/examples/util/IOUtil.java
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/SocketClient.java
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/Util.java
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SSLSocketUtils.java
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/SubnetUtilsTest.java
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/FTPClientConfigTest.java
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/time/TimeTCPClientTest.java
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/time/TimeTestSimpleServer.java

Modified: commons/proper/net/trunk/src/main/java/examples/unix/rexec.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/unix/rexec.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/examples/unix/rexec.java (original)
+++ commons/proper/net/trunk/src/main/java/examples/unix/rexec.java Mon Aug 24 01:27:54 2015
@@ -81,7 +81,7 @@ public final class rexec
                 client.disconnect();
             }
             catch (IOException f)
-            {}
+            {/* ignored */}
             e.printStackTrace();
             System.err.println("Could not execute command.");
             System.exit(1);

Modified: commons/proper/net/trunk/src/main/java/examples/unix/rlogin.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/unix/rlogin.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/examples/unix/rlogin.java (original)
+++ commons/proper/net/trunk/src/main/java/examples/unix/rlogin.java Mon Aug 24 01:27:54 2015
@@ -92,7 +92,7 @@ public final class rlogin
                 client.disconnect();
             }
             catch (IOException f)
-            {}
+            {/* ignored */}
             e.printStackTrace();
             System.err.println("rlogin authentication failed.");
             System.exit(1);

Modified: commons/proper/net/trunk/src/main/java/examples/unix/rshell.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/unix/rshell.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/examples/unix/rshell.java (original)
+++ commons/proper/net/trunk/src/main/java/examples/unix/rshell.java Mon Aug 24 01:27:54 2015
@@ -85,7 +85,7 @@ public final class rshell
                 client.disconnect();
             }
             catch (IOException f)
-            {}
+            {/* ignored */}
             e.printStackTrace();
             System.err.println("Could not execute command.");
             System.exit(1);

Modified: commons/proper/net/trunk/src/main/java/examples/util/IOUtil.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/util/IOUtil.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/examples/util/IOUtil.java (original)
+++ commons/proper/net/trunk/src/main/java/examples/util/IOUtil.java Mon Aug 24 01:27:54 2015
@@ -98,6 +98,7 @@ public final class IOUtil
         }
         catch (InterruptedException e)
         {
+            // Ignored
         }
     }
 

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/SocketClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/SocketClient.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/SocketClient.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/SocketClient.java Mon Aug
24 01:27:54 2015
@@ -334,6 +334,7 @@ public abstract class SocketClient
             try {
                 socket.close();
             } catch (IOException e) {
+                // Ignored
             }
         }
     }
@@ -343,6 +344,7 @@ public abstract class SocketClient
             try {
                 close.close();
             } catch (IOException e) {
+                // Ignored
             }
         }
     }

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java Mon Aug
24 01:27:54 2015
@@ -436,6 +436,7 @@ implements Configurable
                 try {
                     p.load(resourceAsStream);
                 } catch (IOException e) {
+                    // Ignored
                 } finally {
                     try {
                         resourceAsStream.close();
@@ -3825,6 +3826,7 @@ implements Configurable
                 } catch (SocketTimeoutException e) {
                     notAcked++;
                 } catch (IOException e) {
+                    // Ignored
                 }
                 time = now;
             }

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/Util.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/Util.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/Util.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/Util.java Mon Aug 24
01:27:54 2015
@@ -366,6 +366,7 @@ public final class Util
             try {
                 closeable.close();
             } catch (IOException e) {
+                // Ignored
             }
         }
     }
@@ -382,6 +383,7 @@ public final class Util
             try {
                 socket.close();
             } catch (IOException e) {
+                // Ignored
             }
         }
     }

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java
(original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java
Mon Aug 24 01:27:54 2015
@@ -416,6 +416,7 @@ final class TelnetInputStream extends Bu
                                     }
                                     catch (InterruptedException interrupted)
                                     {
+                                        // Ignored
                                     }
                                 }
                                 return EOF;

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SSLSocketUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SSLSocketUtils.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SSLSocketUtils.java
(original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SSLSocketUtils.java
Mon Aug 24 01:27:54 2015
@@ -51,12 +51,12 @@ public class SSLSocketUtils {
                     return true;
                 }
             }
-        } catch (SecurityException e) {
-        } catch (ClassNotFoundException e) {
-        } catch (NoSuchMethodException e) {
-        } catch (IllegalArgumentException e) {
-        } catch (IllegalAccessException e) {
-        } catch (InvocationTargetException e) {
+        } catch (SecurityException e) { // Ignored
+        } catch (ClassNotFoundException e) { // Ignored
+        } catch (NoSuchMethodException e) { // Ignored
+        } catch (IllegalArgumentException e) { // Ignored
+        } catch (IllegalAccessException e) { // Ignored
+        } catch (InvocationTargetException e) { // Ignored
         }
         return false;
     }

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/SubnetUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/SubnetUtilsTest.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/SubnetUtilsTest.java (original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/SubnetUtilsTest.java Mon
Aug 24 01:27:54 2015
@@ -200,6 +200,7 @@ public class SubnetUtilsTest extends Tes
             new SubnetUtils("192.168.0.1/33");
             fail("Should have thrown IllegalArgumentException");
         } catch (IllegalArgumentException expected) {
+            // Ignored
         }
     }
 

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/FTPClientConfigTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/FTPClientConfigTest.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/FTPClientConfigTest.java
(original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/FTPClientConfigTest.java
Mon Aug 24 01:27:54 2015
@@ -179,11 +179,13 @@ public class FTPClientConfigTest extends
             d2 = sdf1.parse("hij 31, 2004");
             fail("should.have.failed.to.parse.weird");
         } catch (ParseException px) {
+            // expected
         }
         try {
             d2 = sdf2.parse("dec 31, 2004");
             fail("should.have.failed.to.parse.standard");
         } catch (ParseException px) {
+            // expected
         }
 
 

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
(original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
Mon Aug 24 01:27:54 2015
@@ -409,11 +409,13 @@ public class FTPTimestampParserImplTest
             checkShortParse("Feb 29th 1999", server, input, expected, true);
             fail("Should have failed to parse Feb 29th 1999");
         } catch (ParseException pe) {
+            // expected
         }
         try {
             checkShortParse("Feb 29th 1999", server, input, expected, false);
             fail("Should have failed to parse Feb 29th 1999");
         } catch (ParseException pe) {
+            // expected
         }
     }
 

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/time/TimeTCPClientTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/time/TimeTCPClientTest.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/time/TimeTCPClientTest.java
(original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/time/TimeTCPClientTest.java
Mon Aug 24 01:27:54 2015
@@ -120,6 +120,7 @@ public class TimeTCPClientTest extends T
             Thread.sleep(1000);
         } catch (Exception e)
         {
+            // ignored
         }
     }
 }

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/time/TimeTestSimpleServer.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/time/TimeTestSimpleServer.java?rev=1697295&r1=1697294&r2=1697295&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/time/TimeTestSimpleServer.java
(original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/time/TimeTestSimpleServer.java
Mon Aug 24 01:27:54 2015
@@ -111,6 +111,7 @@ public class TimeTestSimpleServer implem
                 os.flush();
             } catch (IOException e)
             {
+                // ignored
             } finally
             {
                 if (socket != null) {
@@ -153,6 +154,7 @@ public class TimeTestSimpleServer implem
             server.start();
         } catch (IOException e)
         {
+            // ignored
         }
     }
 



Mime
View raw message