From 957295aceb5c0018d6f6e2cf2278f38a86245034 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Tue, 11 Nov 2014 14:06:58 +0000 Subject: [PATCH] Better exception handling. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1638111 13f79535-47bb-0310-9956-ffa450edef68 --- src/test/java/org/apache/commons/csv/CSVPrinterTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java index f66f37df..caf42553 100644 --- a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java +++ b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java @@ -222,8 +222,8 @@ public class CSVPrinterTest { public void testJdbcPrinter() throws IOException, ClassNotFoundException, SQLException { final StringWriter sw = new StringWriter(); final Connection connection = geH2Connection(); - setUpTable(connection); try { + setUpTable(connection); final Statement stmt = connection.createStatement(); final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.DEFAULT); printer.printRecords(stmt.executeQuery("select ID, NAME from TEST")); @@ -239,8 +239,8 @@ public class CSVPrinterTest { final StringWriter sw = new StringWriter(); Class.forName("org.h2.Driver"); final Connection connection = geH2Connection(); - setUpTable(connection); try { + setUpTable(connection); @SuppressWarnings("resource") // Closed when the connection is closed. final Statement stmt = connection.createStatement(); @@ -262,8 +262,8 @@ public class CSVPrinterTest { final StringWriter sw = new StringWriter(); Class.forName("org.h2.Driver"); final Connection connection = geH2Connection(); - setUpTable(connection); try { + setUpTable(connection); @SuppressWarnings("resource") // Closed when the connection is closed. final Statement stmt = connection.createStatement();