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

Change various JVM enums like LinkInfo::AccessCheck and Klass::DefaultsLookupMode to enum class

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 16
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b11

      Description

      The following enums:

      linkResolver.hpp - class LinkInfo

        enum AccessCheck {
          needs_access_check,
          skip_access_check
        };

      klass.hpp - class Klass

        enum DefaultsLookupMode { find_defaults, skip_defaults };
        enum OverpassLookupMode { find_overpass, skip_overpass };
        enum StaticLookupMode { find_static, skip_static };
        enum PrivateLookupMode { find_private, skip_private };

      Should be changed to C++11 enum class to provide better type safety. Current implementation allows for the enums to be incorrectly compared to boolean true or false.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lfoltan Lois Foltan
              Reporter:
              lfoltan Lois Foltan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: