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

TypeCode.member_label(int) off-by-one error

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      given a four-value enum "enum1" (its values indexed [0,3]) that is a discriminator for a union "union1", allowable values for

      union1Helper.type().member_label(int)

      should be 0 through 3 inclusive, or the function throws a Bounds exception. The returned enum1-carrying Any object's data should correspond to the index provided by the call. Instead, the value returned by a given index of 0 gives the value for 1, and when a value of 3 is specified the function throws a Bounds exception. As expected, a value of -1 correctly throws a Bounds exception.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            bprestonsunw Brian Preston (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: