Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5659

Incorrect highlighting of missing class in JUnit test

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 12.3
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      OS: Windows 10 / 64 bit

      JDK version: AdoptOpenJDK 11.0.10

      NB version: 12.3

      Description

      When editing Java test file syntax highlighting appears to show an error for the class being tested. e.g. for class MyClass, the test MyClassTest will highlight all instances of MyClass as not found. Code completion cannot find the class but the test will compile and run. Appears to be a syntax highlighting and code completion issue only.

      Easy workaround is to refactor the apparently missing class without renaming the test, then refactor back to the original name and recompile. This appears to trigger something that means all the highlighting vanishes.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Peter Kirkham Peter Michael Kirkham
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: