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.
When I addresses a static method using the class name referencing it I get an irritating warning on that line. e.g. Thread.currentThread().sleep(1000); This is in my opinion nothing to warn about but it would be ok on the following: Thread th = new Thread(); th.currentThread().sleep(1000); This is the NetBeans status: Product Version: NetBeans IDE 7.0 Beta 2 (Build 201102140001) Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09 System: Windows XP version 5.1 running on x86; Cp1252; sv_SE (nb) Userdir: C:\Documents and Settings\swelga\.netbeans\7.0beta2 /LG
The Thread.sleep method is static, and so: Thread.currentThread().sleep(1000); can be changed to Thread.sleep(1000); which is simpler and less confusing. This is what the hint warns about. I have changed the underline so that the method name is underlined instead of the site: http://hg.netbeans.org/jet-main/rev/393507a13d35
Integrated into 'main-golden', will be available in build *201103280400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/393507a13d35 User: Jan Lahoda <jlahoda@netbeans.org> Log: #196763: let static access warning underline the method/field name, not the site.