arjansh commented on a change in pull request #227: MM-1219 Returning schemas 
SQL Server
URL: https://github.com/apache/metamodel/pull/227#discussion_r320220004
 
 

 ##########
 File path: jdbc/src/main/java/org/apache/metamodel/jdbc/JdbcDataContext.java
 ##########
 @@ -778,18 +780,33 @@ private String findDefaultSchema(final String 
defaultName, final List<String> sc
      * @throws SQLException
      */
     private Set<String> getSchemaSQLServerNames(DatabaseMetaData metaData) 
throws SQLException {
-        // Distinct schema names. metaData.getTables() is a denormalized
-        // resultset
-        Set<String> schemas = new HashSet<>();
-        ResultSet rs = null;
+        // Distinct schema names. metaData.getTables() is a denormalized 
resultset
+        final Set<String> schemas = new HashSet<>();
+        ResultSet resultSet = null;
+
+        // Find DBO schema if present
         try {
 
 Review comment:
   I personally think we should use the try-with-resources. The 
`FileHelper#safeClose(Object)` is most probably used right now because this 
functionality was originally implemented in a version of java which didn't 
support the try-with-resources construct yet. @kaspersorensen Am I correct 
regarding this?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to