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 109179

Summary: "Accessing static field" warning for non-static method reference
Product: java Reporter: _ tball <tball>
Component: HintsAssignee: issues@java <issues>
Status: RESOLVED WORKSFORME    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description _ tball 2007-07-09 21:06:03 UTC
When displaying jackpot/rules/src/org/netbeans/modules/jackpot/rules/parser/GeneratedMatcher.java with the Jsr199
project open, an "accessing static field" warning is flagged on line 304: return st.isErroneous().  "st" is a
com.sun.tools.javac.code.Type instances, and isErroneous() is not static.  Type.isErroneous(List<Type>) is, however, so
maybe the tester doesn't differentiate between overloaded methods.  Found in 6.0-M10.
Comment 1 jsvec 2007-07-10 10:13:44 UTC
Here is an easier way how to reproduce this bug (the problem occurs on the last line where is st.indexOf()):

public class StaticTest {
    void indexOf() {}   
    static void indexOf(char c) {}
    public static void main(String[] args) {
        StaticTest st = new StaticTest();
        st.indexOf();
    }
}

Comment 2 Jiri Prox 2007-07-10 10:22:54 UTC
Are you able to reproduce it with the latest build? There were several fixes recently.
Comment 3 jsvec 2007-07-10 12:12:21 UTC
It seems that it is fixed.
I can not reproduce this issue in latest nightly build (Build 200707100000).
Comment 4 Jan Lahoda 2007-07-10 19:15:44 UTC
Has been already fixed as a different bug - I do not have the issue number offhand, sorry.
Comment 5 Jiri Prox 2007-07-11 13:37:47 UTC
*** Issue 109328 has been marked as a duplicate of this issue. ***