Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-9664

ArrayIndexOutOfBoundsException may be thrown in TestZKSecretWatcher

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.98.0, 0.96.0
    • None
    • None
    • Reviewed

    Description

      In our internal Jenkins build, I saw failure in TestZKSecretWatcher:

      java.lang.ArrayIndexOutOfBoundsException: 2
      	at org.apache.hadoop.hbase.security.token.TestZKSecretWatcher.setupBeforeClass(TestZKSecretWatcher.java:87)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      

      This was due to i being 1, resulting in index of 2 being used in the following statement:

                KEY_SLAVE = tmp[ i+1 % 2 ];
      

      See http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html

      Attachments

        1. 9664.txt
          0.6 kB
          Ted Yu

        Activity

          People

            yuzhihong@gmail.com Ted Yu
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: