This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit b4ccf59a57de97bac7be90f6acc7d4018d2fbb57 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Mon May 13 12:21:55 2019 +0200 CAMEL-13506 - Fixed CS --- .../aggregate/jdbc/JdbcAggregationRepository.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/components/camel-sql/src/main/java/org/apache/camel/processor/aggregate/jdbc/JdbcAggregationRepository.java b/components/camel-sql/src/main/java/org/apache/camel/processor/aggregate/jdbc/JdbcAggregationRepository.java index 4977b80..09c440f 100644 --- a/components/camel-sql/src/main/java/org/apache/camel/processor/aggregate/jdbc/JdbcAggregationRepository.java +++ b/components/camel-sql/src/main/java/org/apache/camel/processor/aggregate/jdbc/JdbcAggregationRepository.java @@ -289,16 +289,15 @@ public class JdbcAggregationRepository extends ServiceSupport implements Recover return transactionTemplateReadOnly.execute(new TransactionCallback<Exchange>() { public Exchange doInTransaction(TransactionStatus status) { try { - String sql = "SELECT " + EXCHANGE + " FROM " + repositoryName + " WHERE " + ID + " = ?"; - ByteArrayOutputStream bis = new ByteArrayOutputStream(); - jdbcTemplate.query(sql, new Object[]{key}, - new AbstractLobStreamingResultSetExtractor() { - @Override - protected void streamData(ResultSet rs) throws SQLException, IOException, DataAccessException { - FileCopyUtils.copy(getLobHandler().getBlobAsBinaryStream(rs, EXCHANGE), bis); - } - }); - return codec.unmarshallExchange(camelContext, bis.toByteArray()); + String sql = "SELECT " + EXCHANGE + " FROM " + repositoryName + " WHERE " + ID + " = ?"; + ByteArrayOutputStream bis = new ByteArrayOutputStream(); + jdbcTemplate.query(sql, new Object[] {key}, new AbstractLobStreamingResultSetExtractor<Object>() { + @Override + protected void streamData(ResultSet rs) throws SQLException, IOException, DataAccessException { + FileCopyUtils.copy(getLobHandler().getBlobAsBinaryStream(rs, EXCHANGE), bis); + } + }); + return codec.unmarshallExchange(camelContext, bis.toByteArray()); } catch (EmptyResultDataAccessException ex) { return null; } catch (IOException ex) {