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 122772

Summary: Wrong delegation of static methods
Product: java Reporter: Jiri Prox <jiriprox>
Component: EditorAssignee: Jan Jancura <jjancura>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jiri Prox 2007-11-26 14:42:16 UTC
Product Version: NetBeans IDE Dev (Build 20071126023625)
Java: 1.6.0_05-ea; Java HotSpot(TM) Client VM 1.6.0_05-ea-b06
System: Linux version 2.6.5-1.358 running on i386; UTF-8; en_US (nb)

Static method are delegated wrongly. The result is uncompilable code.

Steps to reproduce:
1) have class with field: String a;
2) use alt-insert to delegate static method from a, eg.  valueOf(char)
-> a cannot be accessed from static context
public class NewClass {
    String a;

    public static String valueOf(char c) {
        return a.valueOf(c);
    }    
}
Comment 1 Jiri Prox 2008-04-11 00:54:24 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 2 Jan Becicka 2008-08-14 09:48:22 UTC
should be easy take a look at java.editor.codegen package...
Comment 3 Jan Becicka 2008-11-13 13:36:45 UTC
P4
Comment 4 Quality Engineering 2009-11-02 11:00:46 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX