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

Investigate Method access flag handling in ClassFile API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 24
    • core-libs
    • None

      In the ClassFile API, we require the access flags for a method to be passed upon method creation, and this flag's static bit cannot be modified later. This approach implies that a call withFlags on a method builder may unexpectedly throw IllegalArgumentException. We should find the correct locations to document this IAE behavior.

      An alternative way might be to throw IllegalStateException if we try to pass something dependent on access flags before the flags are set and specify, but that might be problematic as well.

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

              Created:
              Updated:
              Resolved: