Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8167260

Arrays.binarySearch element not found issue

XMLWordPrintable

    • generic
    • generic
    • Verified

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      String[] suchBlock;

      suchBlock is JTextField.getText() Insert

      test = Arrays.binarySearch(suchBlock, 0, suchBlock.length, JTextField.getText())

      exam) suchBlock = { "a", "b", "c" };
      JTextField.getText() equals "a" True
      test == -1

      REGRESSION. Last worked in version 8u102


      REPRODUCIBILITY :
      This bug can be reproduced occasionally.

        1. screenshot-1.png
          89 kB
          Abhijit Roy
        2. Test.java
          8 kB
          Abhijit Roy

            aroy Abhijit Roy (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: