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

Cleanup Type::cmp definition and usage

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 23
    • 23
    • hotspot
    • b21

      Currently, Type::cmp is designed to return an integer 0 when types are equal, and an integer 1 when they are not. This is used as a comparator for the type dictionary, but it makes usages at call sites confusing. I think it would be cleaner to define the function as returning a boolean denoting equality and passing a lambda to the dictionary for use as a comparator.

            jkarthikeyan Jasmine Karthikeyan
            jkarthikeyan Jasmine Karthikeyan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: