Deprecate Modifier.toString

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • 27
    • Affects Version/s: 27
    • Component/s: core-libs
    • None

      The Modifier.toString API was initially designed with the assumption that source modifiers almost always correspond to class file access flags, and access flag in different locations can have the same interpretation. This is no longer the case in modern Java SE, and the situation gets worse in Valhalla, where there are more overlaps (SYNCHRONIZED versus IDENTITY, etc.).

      We should deprecate this API and ask people to use AccessFlags to correctly interpret or debug print the masks.

            Assignee:
            Chen Liang
            Reporter:
            Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: