phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jay wong (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-1025) PhoenixConnection constructor Peoperties set isn't deep copy
Date Mon, 09 Jun 2014 02:12:01 GMT

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

jay wong commented on PHOENIX-1025:
-----------------------------------

I overlooked. thx 

> PhoenixConnection constructor Peoperties set isn't deep copy
> ------------------------------------------------------------
>
>                 Key: PHOENIX-1025
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1025
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: jay wong
>             Fix For: 3.0.0
>
>         Attachments: PHOENIX-1025.patch
>
>
> {code}
>  public PhoenixConnection(ConnectionQueryServices services, String url, Properties info,
PMetaData metaData) throws SQLException {
>         this.url = url;
>         // Copy so client cannot change
>         this.info = info == null ? new Properties() : new Properties(info);
>         final PName tenantId = JDBCUtil.getTenantId(url, info);
>         if (this.info.isEmpty() && tenantId == null) {
>             this.services = services;
>         } else {
>         .....
>         }
> }
> {code}
> As this.info is set with new Properties(info).
> So at the code below info.isEmpty() is always return true.
> I think this.info should be set as PropertiesUtil.deepCopy(info); 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message