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

Confusing error message required: value, found class

    XMLWordPrintable

    Details

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

      Description

      Compiling this program:

      public class X {
          public static void main(String [] args) {
              if (args __matches Object []) {
                  System.out.println("Blah");
              }
          }
      }

      // ---

      elicits:

      /home/srikanth/tmp/X.java:3: error: unexpected type
              if (args __matches Object []) {
                                        ^
        required: value
        found: class
      1 error

      Not sure what to make of it.

        Attachments

          Activity

            People

            Assignee:
            jlahoda Jan Lahoda
            Reporter:
            sadayapalam Srikanth Adayapalam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: