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

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 15
    • 16
    • hotspot
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: