shaofengshi commented on a change in pull request #398: Kylin 3597 fix sonar
issues
URL: https://github.com/apache/kylin/pull/398#discussion_r243737636
##########
File path:
datasource-sdk/src/main/java/org/apache/kylin/sdk/datasource/adaptor/AbstractJdbcAdaptor.java
##########
@@ -125,9 +125,10 @@ protected String getSourceValidationSql() {
* @throws SQLException
*/
protected CachedRowSet cacheResultSet(ResultSet resultSet) throws
SQLException {
- CachedRowSet crs = new FixedCachedRowSetImpl();
- crs.populate(resultSet);
- return crs;
+ try (CachedRowSet crs = new FixedCachedRowSetImpl()) {
Review comment:
I'm afraid this will lead to error.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services