[ 
https://issues.apache.org/jira/browse/PHOENIX-3055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15365453#comment-15365453
 ] 

Enis Soztutar commented on PHOENIX-3055:
----------------------------------------

This looks fine to me. 

This change should not be needed: 
{code}
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index 77dccb1..7e4c883 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -3427,6 +3427,7 @@ public class MetaDataClient {
                                 try (PhoenixConnection tenantConn = 
DriverManager.getConnection(connection.getURL(), 
props).unwrap(PhoenixConnection.class)) {
                                     PostDDLCompiler dropCompiler = new 
PostDDLCompiler(tenantConn);
                                     
tenantConn.getQueryServices().updateData(dropCompiler.compile(entry.getValue(), 
null, null, Collections.<PColumn>emptyList(), ts));
+                                    tenantConn.close();
{code}
since {{tenantConn}} is already closed by the {{try}} construct. 

Did you run the tests with this? 

> Fix a few resource leaks and null dereferences reported by Coverity
> -------------------------------------------------------------------
>
>                 Key: PHOENIX-3055
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3055
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Alicia Ying Shu
>            Assignee: Alicia Ying Shu
>            Priority: Minor
>             Fix For: 4.8.0
>
>         Attachments: PHOENIX-3055.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to