Release Note: Add `lint` Warning for Restricted Method Calls

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Delivered
    • Priority: P4
    • 22
    • Affects Version/s: 22
    • Component/s: tools

      Some methods in the Foreign Function & Memory API are unsafe. When used improperly, these methods can lead to loss of memory safety which can result in a JVM crash or silent memory corruption. Accordingly, the unsafe methods in the FFM API are *restricted*. This means that their use is permitted, but by default causes a warning to be issued at run time. To indicate where run time warnings may occur, a new javac lint option, `-Xlint:restricted`, causes warnings to be issued at compile time if restricted methods are called in source code. These compile-time warnings can be suppressed using `@SuppressWarnings("restricted")`.

            Assignee:
            Maurizio Cimadamore
            Reporter:
            Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: