You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/09/19 08:19:00 UTC

[jira] [Work logged] (CURATOR-583) Fix ArrayIndexOutOfBoundsException when passing empty list parameter to reconfigure API

     [ https://issues.apache.org/jira/browse/CURATOR-583?focusedWorklogId=486483&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-486483 ]

ASF GitHub Bot logged work on CURATOR-583:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Sep/20 08:18
            Start Date: 19/Sep/20 08:18
    Worklog Time Spent: 10m 
      Work Description: hjyun328 opened a new pull request #374:
URL: https://github.com/apache/curator/pull/374


   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


----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 486483)
    Remaining Estimate: 0h
            Time Spent: 10m

> Fix ArrayIndexOutOfBoundsException when passing empty list parameter to reconfigure API
> ---------------------------------------------------------------------------------------
>
>                 Key: CURATOR-583
>                 URL: https://issues.apache.org/jira/browse/CURATOR-583
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 5.1.0
>            Reporter: hyeong jun yun
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)