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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: repo-amber
    • Fix Version/s: repo-amber
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      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

        Attachments

          Activity

            People

            Assignee:
            sadayapalam Srikanth Adayapalam
            Reporter:
            sadayapalam Srikanth Adayapalam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: