Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-583

Fix ArrayIndexOutOfBoundsException when passing empty list parameter to reconfigure API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.1.0
    • None
    • Framework
    • None

    Description

      Whenever I add zookeeper servers by using reconfig API of the curator client, it always throw ArrayIndexOutOfBoundsException.

      If there are no servers to add or remove when using reconfigure API of ZooKeeperAdmin, I think it must pass not empty list parameter but null to reconfigure API. Because ZooKeeperAdmin tries to join strings by accessing first index of the server list.

      Please refer to the link below.

      https://github.com/apache/zookeeper/blob/release-3.6.2/zookeeper-server/src/main/java/org/apache/zookeeper/admin/ZooKeeperAdmin.java#L267-L269

      https://github.com/apache/zookeeper/blob/release-3.6.2/zookeeper-server/src/main/java/org/apache/zookeeper/common/StringUtils.java#L57

      Attachments

        Activity

          People

            Unassigned Unassigned
            hjyun328 hyeong jun yun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h