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

[local-methods] Finder should not recommend native methods as local method candidates

XMLWordPrintable

    • generic
    • generic

      Given:

      public class X {
          
          private static native void xxx();
          public static void main(String [] args) {
              xxx();
          }

      }

      javac invoked with -XDfind=local-methods, prints:

      /home/srikanth/tmp/X.java:3: warning: This method may be declared local to the method main(String[]) defined in class X
          private static native void xxx();
                                     ^
      1 warning

            sadayapalam Srikanth Adayapalam (Inactive)
            sadayapalam Srikanth Adayapalam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: