You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2014/11/11 15:06:59 UTC
svn commit: r1638111 -
/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
Author: ggregory
Date: Tue Nov 11 14:06:58 2014
New Revision: 1638111
URL: http://svn.apache.org/r1638111
Log:
Better exception handling.
Modified:
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java?rev=1638111&r1=1638110&r2=1638111&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java Tue Nov 11 14:06:58 2014
@@ -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();