ARTEMIS-2320 Stream API call chain can be simplified

This commit is contained in:
Jiri Danek 2019-04-26 22:49:05 +02:00 committed by Michael Andre Pearce
parent 3e87249d75
commit 83f0ef2878
1 changed files with 1 additions and 2 deletions

View File

@ -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();