Uploaded image for project: 'Jandex'
  1. Jandex
  2. JANDEX-3

sort first before binarySearch

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 1.0.0.Beta7
    • None
    • None

    Description

      I have a AnnotationInstance like this,
      javax.persistence.JoinTable:
      Method: org.hibernate.test.annotations.onetoone.Father org.hibernate.test.annotations.onetoone.Son.getFather()
      (name = "father_son", joinColumns = [@javax.persistence.JoinColumn(name = "foo")], inverseJoinColumns = [@javax.persistence.JoinColumn(name = "bar")])

      but when I call annotationInstance.value("name"), it returns me null, apparently, this is caused by the Arrays.binarySearch used in value(String name) method.

      the AnnotationValue array in AnnotationInstance is unsorted, at least, it is not documented in org.jboss.jandex.AnnotationInstance#create that a sorted AnnotationValue array is required

      Attachments

        Activity

          People

            jgreene@redhat.com Jason Greene
            shaozliu Strong Liu(刘少壮) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: