This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269688 - Bogus error badges on target/generated-sources/annotations/**/*.java
Summary: Bogus error badges on target/generated-sources/annotations/**/*.java
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: Dev
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-30 20:24 UTC by Jesse Glick
Modified: 2017-03-09 11:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (274.86 KB, image/png)
2017-01-30 20:24 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2017-01-30 20:24:42 UTC
Created attachment 163512 [details]
Screenshot

Dev build. Open https://github.com/stapler/netbeans-stapler-plugin/blob/2f8b9b6d9bdd777012c582315775e400d31b8742/pom.xml and its modules. You will see error badges on the generated `Bundle.java`, on the node and on the editor tab, and errors under Action Items—even though no errors are shown inline in the editor, the status box is green, and clicking on the usages of `NbBundle` jumps to the corresponding sources as expected.

Opening the Properties of the `Bundle.java` node shows the compile classpath including `org-openide-util-*.jar` as expected, so I do not think the `maven` module is doing anything wrong here. The metadata inspector output looks right:

Java source roots:
  "Source Packages" (1SourceRoot): …/stapler-plugin/src/main/java
    source level: 1.7
    encoding: UTF-8
    binaries: …/stapler-plugin/target/classes ~/.m2/repository/org/kohsuke/stapler/netbeans/plugin/1.6/plugin-1.6.jar
    test roots: …/stapler-plugin/src/test/java
    classpath/source: …/stapler-plugin/src/main/java …/stapler-plugin/target/generated-sources/annotations …/stapler-plugin/src/main/resources
    classpath/compile:
      …
      ~/.m2/repository/org/netbeans/api/org-openide-util/RELEASE80/org-openide-util-RELEASE80.jar
        sources (informational): ~/.m2/repository/org/netbeans/api/org-openide-util/RELEASE80/org-openide-util-RELEASE80-sources.jar
      …
      …/stapler-plugin/target/classes
        sources (authoritative): …/stapler-plugin/src/main/java …/stapler-plugin/target/generated-sources/annotations …/stapler-plugin/src/main/resources
  …

Whatever is amiss, it is clearly incorrect for the Java infrastructure to be reporting compilation errors in some places yet showing no errors in the actual source lines.
Comment 1 Svata Dedic 2017-03-09 11:14:14 UTC
Hm, could not reproduce. I've cloned the github repo and run priming maven build. After that, Stapler Plugin module opened cleanly, no errors anywhere.

Pls. try to erase caches and load the project again. It is otherwise the same as inconsistency between file badges and editor reported elsewhere against java.source