activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michaelpea...@apache.org
Subject [activemq-artemis] 07/08: ARTEMIS-2320 Stream API call chain can be simplified
Date Mon, 29 Apr 2019 10:28:13 GMT
This is an automated email from the ASF dual-hosted git repository.

michaelpearce pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git

commit 83f0ef2878d94e41a4572efc02965dca0daf3bfd
Author: Jiri Danek <jdanek@redhat.com>
AuthorDate: Fri Apr 26 22:49:05 2019 +0200

    ARTEMIS-2320 Stream API call chain can be simplified
---
 .../apache/activemq/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 7052deb..7bfe42a 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();


Mime
View raw message