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.
Apply Design Pattern Bridge. Generated source code for interface Abstraction has private , not initialaized memeber. /// Fixed. See related INF ---- for details. The fix can be verified in tonite's (09-16-2004) nightly build. ------ 2004-09-16 Still exists in nightly from 09-26. ------- 2004-09-27 I just downloaded 09-26 nitely and I cannot reproduce the problem. Here is how the interface looks now. public interface Abstraction { public static final Implementor mImplementor = null; public void operation(); } Marking it integrated again. Please delete your userdir and test again. Try some other nitely if possible if you found this problem again. ------ 2004-09-28 I tried it with nightly build040928_1 and I got the same generated code as Sam's. ------ 2004-09-28 Yes I got the same code. This code is absolutely senseless. Please , DONT place any implementation member in interface . I already have wrote about this many time. Nobody will use this pattern because it should be changed right after applying. Either interface should be changed to abstract class or mImplementor should be moved to RefinedAbstraction. Now brifge pattern have wrong design. ------ 2004-09-30 /// Evaluation (Entry 2): it's in bad state yet (after last "fix") in coke 060618
In the latest 6.5 build as well as 6.1, the generated interface looks like the following which is a public member but not initialized. public interface Abstraction { public static final Implementor mImplementor; public void operation (); }
Agree with Viktor's comment below regarding the attribute initialization. So, close it since the main issue here is the private attribute which is no longer reproducible or already fixed. From Viktor: I'm not sure what the codegen should decide for user what to initialize the member with. Putting in some default ( like " = null") would mere serve only the purpose of making it compilable thus hiding the real situation. On the other side having this compile error helps the user to explicitly see where his model is logically incomplete.
verified in 6.5.