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 109328 - Spurious "Accessing static field" warnings
Summary: Spurious "Accessing static field" warnings
Status: RESOLVED DUPLICATE of bug 109179
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-11 09:37 UTC by dynamite
Modified: 2007-09-26 09:14 UTC (History)
0 users

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 dynamite 2007-07-11 09:37:53 UTC
String text;
text.indexOf('#');

For the above code fragment I get a "Accessing static field" warning shown for text.  It then suggests replacing text
with String.  This is clearly incorrect.  I have noticed this in a couple of places when referencing objects of classes
that I have written.  The problem seems to be that the syntax checker gets confused if there is a static method of the
same name as the non-static method that is actually being called.  In this case the syntax checker should take note of
the arguments that are being supplied.
Comment 1 dynamite 2007-07-11 09:39:23 UTC
Incidentally I am using milestone 10 and JDK 1.5.0_11.
Comment 2 novakm 2007-07-11 13:22:56 UTC
Reassigning to Java for evaluation.
Comment 3 Jiri Prox 2007-07-11 13:37:54 UTC
This should be fixed now. Thanks for your report

*** This issue has been marked as a duplicate of 109179 ***