From 86ec07c67c51908ad72dbe6db7479f351a97f497 Mon Sep 17 00:00:00 2001 From: Andreas Reichel Date: Sun, 29 Jan 2023 14:03:15 +0700 Subject: [PATCH] style: Appease PMD/Codacy --- src/test/java/net/sf/jsqlparser/test/TestUtils.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/java/net/sf/jsqlparser/test/TestUtils.java b/src/test/java/net/sf/jsqlparser/test/TestUtils.java index 061ab7f87f..4d91192acd 100644 --- a/src/test/java/net/sf/jsqlparser/test/TestUtils.java +++ b/src/test/java/net/sf/jsqlparser/test/TestUtils.java @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map; import java.util.function.Consumer; +import java.util.logging.*; import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -155,9 +156,9 @@ private static void writeTestToFile(String sanitizedInputSqlStr) { IOUtils.write("\n;", fileWriter); } IOUtils.write("\n\n", fileWriter); - } catch (IOException e) { - throw new RuntimeException(e); - } + } catch (IOException ex) { + Logger.getLogger(TestUtils.class.getName()).log(Level.SEVERE, "Writing SQL to file failed.", ex); + }throw new RuntimeException(e); } }