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 160109 - False error annotation
Summary: False error annotation
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker with 1 vote (vote)
Assignee: Max Sauer
URL:
Keywords:
Depends on:
Blocks: 121950
  Show dependency tree
 
Reported: 2009-03-11 14:22 UTC by ailinykh
Modified: 2009-08-10 11:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ailinykh 2009-03-11 14:22:02 UTC
I can compile project with no any errors, but IDE shows error annotation
Comment 1 Max Sauer 2009-03-11 14:27:29 UTC
Please provide example source and steps to reproduce, your IDE version and messages.log file found in your $HOME/.netbeans/<version>/var/log/ dir. 
Thanks.
Comment 2 ailinykh 2009-03-11 14:42:26 UTC
I have two Java class library projects (A and B). They are located in the same directory, but there is no dependency
between them. Both of them depends on jar file with the same name, but different version. So, I have
Project A
   /lib
      MyLibrary.jar (this is version 1.0)
Project B
   /lib
      MyLibrary.jar (this is version 1.1, the same name but different content, only project B is written against this
version)

Project A compiles successfully, but IDE shows error badges for some import statements. If I move Project B to another
place or just rename Project B/lib/MyLibrary.jar, Project A becomes consistent, there are no error badges any more.
It tells us class path of project B some how leaks into Project A.


The IDE I use:
Product Version: NetBeans IDE 6.5 (Build 200811100001)
Java: 1.6.0_11; Java HotSpot(TM) Client VM 11.0-b16
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 3 Max Sauer 2009-03-11 14:56:23 UTC
Please do not set TM, this is up to responsible developer. These two projects are common j2se projects, right? What about the jars, how were they added? 
(Library/Project/JAR dependency?). Thanks.
Comment 4 ailinykh 2009-03-11 15:06:49 UTC
What is TM?
Yes they are regular j2se projects. I added jar through "Add Jar/Folder" button on Libraries panel.
Comment 5 Jiri Prox 2009-03-16 17:53:47 UTC
TM is target milestone, you've set it to TBD by your last comment. Probably by accident.

Can you attach project.properties form both projects? (they are located in folder nbproject in project root dir)
Thanks
Comment 6 rgarske 2009-05-04 09:44:48 UTC
I see hundreds of false error annotations in some of my projects also. Projects run and compile fine.
Projects look fine in Netbeans 6.1
Projects also looked fine in Development build netbeans-trunk-nightly-200903310200-ml-windows.exe, which I was using 
for about 3 weeks. After that, Netbeans suggested to download some upgrades, which I did. After that, I ran into a lot
of exceptions, ind my conclusion was that the Dev build 200903310200 was too old for the updates, so I began looking 
for new ones. First try was netbeans-trunk-nightly-200904201507-ml-windows.exe, which showed the false error 
annotations. I also tried the beta, and today netbeans-trunk-nightly-200905040001-ml-windows.exe, all of them show this 
bug.

In some cases I get false error annotations for methods from the same package, where the source is clearly available 
and has no error annotation. From the other module, where the error is shown, I can use "Navigate/Go to Declaration",
and the source is opened, but not navigating to the correct place of the method declaration. But the method is showing
in the "Navigator/Members view" window. If I go to the Method and use "find usages", it does not find the usage that 
gives the false error annotation. But obviously the compiler does.
Comment 7 rgarske 2009-05-05 14:35:01 UTC
I would like to add that my projects are in UTF8, which means the encoding set for the project is UTF8 and all the java 
sources are in UTF8. This worked fine in Netbeans 6.1 and was no problem in Dev build 200903310200 also. There are also 
some umlauts (like ä, ö, ü) in some identifiers. This is fine with the java compiler, does not give error bullets in 
the editors left border region, but in the task list is reported with red circeled exclamation mark and text 
like "illegal character \188".
Comment 8 Max Sauer 2009-05-11 11:48:35 UTC
Dusane, could you please have a look at the last two comments in this issue? Thanks.
Comment 9 reinouts 2009-06-24 10:26:45 UTC
I'm having a similar issue in 6.7RC3. See also
http://forums.netbeans.org/viewtopic.php?t=5903&postdays=0&postorder=asc&start=15 .
Comment 10 reinouts 2009-06-24 10:52:55 UTC
I have a hunch that only those classes are falsely marked as containing errors, where components of Google Collections
1.0rc2 library are used!
Comment 11 rgarske 2009-06-24 12:05:40 UTC
I see this in some of my projects also, with no Google involved. But when I open the same list of
projects with NetBeans Dev 200906230201 I see no error badges and an empty tasklist. So I think
Netbeans RC3 is missing some fixes from the latest dev build branch.
Comment 12 Dusan Balek 2009-08-07 19:17:32 UTC
Is the issue reproducible using the current dev build? Thanks.
Comment 13 reinouts 2009-08-10 11:49:40 UTC
After a few hours of using the 20090808 build, I wasn't able to reproduce the problem.
Comment 14 Max Sauer 2009-08-10 11:56:27 UTC
OK, closing as FIXED for now. Please reopen if it occurs again.