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

Add internal annotation to mark restricted methods

XMLWordPrintable

      Restricted methods in the FFM API are methods that, if used incorrectly, can lead to JVM crashes, or, worse, silent memory corruption. It would be useful, for auditing purposes, to clearly mark all the restricted methods in the Java SE API as such, using an internal annotation (as we did for preview methods).

      An annotation would allow us, among other things to:

      * generate Lint warnings when code is compiled against restricted APIs
      * automate the generation of javadoc text around restricted methods
      * help classfile processor to detect all usages of restricted methods in an application jar

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: