Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-1025

PhoenixConnection constructor Peoperties set isn't deep copy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 3.0.0
    • 3.0.0
    • None
    • None

    Description

       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 {
              .....
              }
      }
      

      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);

      Attachments

        1. PHOENIX-1025.patch
          1 kB
          jay wong

        Activity

          People

            Unassigned Unassigned
            jaywong jay wong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: