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.
[custom build from recent sources] Have two files in the same package, A.java and B.java: public class A { B b; Unknown u; } public class B { A a; Unknown u; } Disable the OnePassCompileWorker in java.source (e.g. by adding "|| true" to "if (jt == null || units == null) {" in SuperOnePassCompileWorker). Modify them both, switch to some other file and press Save All. One of the files will not have an error badge. The problem is that org.netbeans.modules.java.source.indexing.DiagnosticListenerImpl.getDiagnostics compares JavaFileObjects on instance equality, but the instances may differ in MultipassWorker.
The original problem fixed by: http://hg.netbeans.org/jet-main/rev/ae47803540da I would consider this patch to be quite safe. I have found another problem where the errors were not reported correctly, and attempted to fix it: http://hg.netbeans.org/main/nb-javac/rev/a0140acb2b3d http://hg.netbeans.org/jet-main/rev/8e4cf2406610 These two would be good candidates for 7.0, I think, although I cannot claim that the second fix is safe. I have also added option to disable the one-pass compile workers, as it seems that the multi-pass worker is apparently not properly tested: http://hg.netbeans.org/jet-main/rev/7eefbdc49d26 The multi-pass worker can be forced using the following command line option: -J-Dorg.netbeans.modules.java.source.indexing.JavaCustomInxer.no.one.pass.compile.worker=true
Integrated into 'main-golden', will be available in build *201103120400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ae47803540da User: Jan Lahoda <jlahoda@netbeans.org> Log: #196554: storing and getting Diagnostics based on their URIs, not FileObjects instances, as the FileObjects can differ in the MultiPassCompileWorker.
The patch seems fine to me.
Verified in trunk based on verification of 188323. I agree with integration to NB7.0.
Transplanted to release70: http://hg.netbeans.org/releases/rev/3e1637da5c05 http://hg.netbeans.org/releases/rev/db70e843b785
Marked as Verified in 70 - based on the verification of fix 188323.