db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r470305 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/StreamTest.java
Date Thu, 02 Nov 2006 10:04:22 GMT
Author: kahatlen
Date: Thu Nov  2 02:04:21 2006
New Revision: 470305

URL: http://svn.apache.org/viewvc?view=rev&rev=470305
Log:
DERBY-2005: Convert jdbcapi/Stream.java to JUnit

Clean-up patch contributed by Fernanda Pizzorno.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/StreamTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/StreamTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/StreamTest.java?view=diff&rev=470305&r1=470304&r2=470305
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/StreamTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/StreamTest.java
Thu Nov  2 02:04:21 2006
@@ -138,19 +138,9 @@
             
         } catch(SQLException se) {
             assertSQLState(LANG_STREAM_RETRIEVED_ALREADY, se);
-        } finally {
-            if (st != null) {
-                st.close();
-            }
-            
-            if (rs != null) {
-                rs.close();
-            }
-            
-            if (is != null) {
-                is.close();
-            }
         }
+        rs.close();
+        st.close();
     }
     
     public void runGetReaderTwiceTest() throws SQLException, IOException {
@@ -170,19 +160,9 @@
             
         } catch(SQLException se) {
             assertSQLState(LANG_STREAM_RETRIEVED_ALREADY, se);
-        } finally {
-            if (st != null) {
-                st.close();
-            }
-            
-            if (rs != null) {
-                rs.close();
-            }
-            
-            if (reader != null) {
-                reader.close();
-            }
         }
+        rs.close();
+        st.close();
     }
     
     private static final String LANG_STREAM_RETRIEVED_ALREADY = "XCL18";



Mime
View raw message