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

Incorrect highlighting of missing class in JUnit test

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 12.3
    • None
    • None
    • 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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m