commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r797664 - in /commons/proper/codec/trunk/src: java/org/apache/commons/codec/net/ test/org/apache/commons/codec/ test/org/apache/commons/codec/net/
Date Fri, 24 Jul 2009 21:42:07 GMT
Author: ggregory
Date: Fri Jul 24 21:42:07 2009
New Revision: 797664

URL: http://svn.apache.org/viewvc?rev=797664&view=rev
Log:
Apply consistent format for catch clauses.

Modified:
    commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/URLCodec.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/BinaryEncoderAbstractTest.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/StringEncoderAbstractTest.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QCodecTest.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/RFC1522CodecTest.java
    commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java

Modified: commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/URLCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/URLCodec.java?rev=797664&r1=797663&r2=797664&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/URLCodec.java (original)
+++ commons/proper/codec/trunk/src/java/org/apache/commons/codec/net/URLCodec.java Fri Jul
24 21:42:07 2009
@@ -177,7 +177,7 @@
                         throw new DecoderException("Invalid URL encoding");
                     }
                     buffer.write((char)((u << 4) + l));
-                } catch(ArrayIndexOutOfBoundsException e) {
+                } catch (ArrayIndexOutOfBoundsException e) {
                     throw new DecoderException("Invalid URL encoding");
                 }
             } else {
@@ -247,7 +247,7 @@
         }
         try {
             return encode(pString, getDefaultCharset());
-        } catch(UnsupportedEncodingException e) {
+        } catch (UnsupportedEncodingException e) {
             throw new EncoderException(e.getMessage());
         }
     }
@@ -289,7 +289,7 @@
         }
         try {
             return decode(pString, getDefaultCharset());
-        } catch(UnsupportedEncodingException e) {
+        } catch (UnsupportedEncodingException e) {
             throw new DecoderException(e.getMessage());
         }
     }

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/BinaryEncoderAbstractTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/BinaryEncoderAbstractTest.java?rev=797664&r1=797663&r2=797664&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/BinaryEncoderAbstractTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/BinaryEncoderAbstractTest.java
Fri Jul 24 21:42:07 2009
@@ -42,7 +42,7 @@
         BinaryEncoder encoder = makeEncoder();
         try {
             encoder.encode(null);
-        } catch( EncoderException ee ) {
+        } catch (EncoderException ee) {
             // An exception should be thrown
         }
     }        

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/StringEncoderAbstractTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/StringEncoderAbstractTest.java?rev=797664&r1=797663&r2=797664&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/StringEncoderAbstractTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/StringEncoderAbstractTest.java
Fri Jul 24 21:42:07 2009
@@ -47,7 +47,7 @@
         
         try {
             encoder.encode(null);
-        } catch( EncoderException ee ) {
+        } catch (EncoderException ee) {
             // An exception should be thrown
         }
     }        
@@ -58,7 +58,7 @@
         try {
             StringEncoder encoder = makeEncoder();
             encoder.encode( new Float( 3.4 ) );
-        } catch( Exception e ) {
+        } catch (Exception e) {
             exceptionThrown = true;
         }
 

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QCodecTest.java?rev=797664&r1=797663&r2=797664&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QCodecTest.java (original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QCodecTest.java Fri Jul
24 21:42:07 2009
@@ -136,7 +136,7 @@
             Object dObj = new Double(3.0);
             qcodec.encode( dObj );
             fail( "Trying to url encode a Double object should cause an exception.");
-        } catch( EncoderException ee ) {
+        } catch (EncoderException ee) {
             // Exception expected, test segment passes.
         }
     }
@@ -147,13 +147,13 @@
             try {
                qcodec.encode("Hello there!");
                 fail( "We set the encoding to a bogus NONSENSE vlaue, this shouldn't have
worked.");
-            } catch( EncoderException ee ) {
+            } catch (EncoderException ee) {
                 // Exception expected, test segment passes.
             }
             try {
                qcodec.decode("=?NONSENSE?Q?Hello there!?=");
                 fail( "We set the encoding to a bogus NONSENSE vlaue, this shouldn't have
worked.");
-            } catch( DecoderException ee ) {
+            } catch (DecoderException ee) {
                 // Exception expected, test segment passes.
             }
     }
@@ -172,7 +172,7 @@
             Object dObj = new Double(3.0);
             qcodec.decode( dObj );
             fail( "Trying to url encode a Double object should cause an exception.");
-        } catch( DecoderException ee ) {
+        } catch (DecoderException ee) {
             // Exception expected, test segment passes.
         }
     }

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java?rev=797664&r1=797663&r2=797664&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/QuotedPrintableCodecTest.java
Fri Jul 24 21:42:07 2009
@@ -116,19 +116,19 @@
         try {
             qpcodec.decode("=");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
         try {
             qpcodec.decode("=A");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
         try {
             qpcodec.decode("=WW");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
     }
@@ -193,7 +193,7 @@
             Object dObj = new Double(3.0);
             qpcodec.encode( dObj );
             fail( "Trying to url encode a Double object should cause an exception.");
-        } catch( EncoderException ee ) {
+        } catch (EncoderException ee) {
             // Exception expected, test segment passes.
         }
     }
@@ -204,13 +204,13 @@
             try {
                qpcodec.encode(plain);
                 fail( "We set the encoding to a bogus NONSENSE vlaue, this shouldn't have
worked.");
-            } catch( EncoderException ee ) {
+            } catch (EncoderException ee) {
                 // Exception expected, test segment passes.
             }
             try {
                qpcodec.decode(plain);
                 fail( "We set the encoding to a bogus NONSENSE vlaue, this shouldn't have
worked.");
-            } catch( DecoderException ee ) {
+            } catch (DecoderException ee) {
                 // Exception expected, test segment passes.
             }
     }
@@ -235,7 +235,7 @@
             Object dObj = new Double(3.0);
             qpcodec.decode( dObj );
             fail( "Trying to url encode a Double object should cause an exception.");
-        } catch( DecoderException ee ) {
+        } catch (DecoderException ee) {
             // Exception expected, test segment passes.
         }
     }

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/RFC1522CodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/RFC1522CodecTest.java?rev=797664&r1=797663&r2=797664&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/RFC1522CodecTest.java
(original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/RFC1522CodecTest.java
Fri Jul 24 21:42:07 2009
@@ -61,43 +61,43 @@
         try {
             testcodec.decodeText("whatever");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
         try {
             testcodec.decodeText("=?stuff?=");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
         try {
             testcodec.decodeText("=?UTF-8?stuff?=");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
         try {
             testcodec.decodeText("=?UTF-8?T?stuff");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
         try {
             testcodec.decodeText("=??T?stuff?=");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
         try {
             testcodec.decodeText("=?UTF-8??stuff?=");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
         try {
             testcodec.decodeText("=?UTF-8?W?stuff?=");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
     }

Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java?rev=797664&r1=797663&r2=797664&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java (original)
+++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/net/URLCodecTest.java Fri
Jul 24 21:42:07 2009
@@ -130,19 +130,19 @@
         try {
             urlCodec.decode("%");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
         try {
             urlCodec.decode("%A");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
         try {
             urlCodec.decode("%WW");
             fail("DecoderException should have been thrown");
-        } catch(DecoderException e) {
+        } catch (DecoderException e) {
             // Expected. Move on
         }
         this.validateState(urlCodec);
@@ -220,7 +220,7 @@
             Object dObj = new Double(3.0);
             urlCodec.encode( dObj );
             fail( "Trying to url encode a Double object should cause an exception.");
-        } catch( EncoderException ee ) {
+        } catch (EncoderException ee) {
             // Exception expected, test segment passes.
         }
         this.validateState(urlCodec);
@@ -264,7 +264,7 @@
             Object dObj = new Double(3.0);
             urlCodec.decode( dObj );
             fail( "Trying to url encode a Double object should cause an exception.");
-        } catch( DecoderException ee ) {
+        } catch (DecoderException ee) {
             // Exception expected, test segment passes.
         }
         this.validateState(urlCodec);



Mime
View raw message