From 83f0ef2878d94e41a4572efc02965dca0daf3bfd Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Fri, 26 Apr 2019 22:49:05 +0200 Subject: [PATCH] ARTEMIS-2320 Stream API call chain can be simplified --- .../artemis/jdbc/store/drivers/AbstractJDBCDriver.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/AbstractJDBCDriver.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/AbstractJDBCDriver.java index 7052deb7fc..7bfe42a443 100644 --- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/AbstractJDBCDriver.java +++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/AbstractJDBCDriver.java @@ -27,7 +27,6 @@ import java.sql.Statement; import java.util.Arrays; import java.util.Properties; import java.util.concurrent.Executor; -import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.activemq.artemis.jdbc.store.logging.LoggingConnection; @@ -271,7 +270,7 @@ public abstract class AbstractJDBCDriver { connection.commit(); } } catch (SQLException e) { - final String sqlStatements = Stream.of(sqls).collect(Collectors.joining("\n")); + final String sqlStatements = String.join("\n", sqls); logger.error(JDBCUtils.appendSQLExceptionDetails(new StringBuilder(), e, sqlStatements)); try { connection.rollback();