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 78870 - Design Patterns: Bridge pattern : interface has private attribue
Summary: Design Patterns: Bridge pattern : interface has private attribue
Status: VERIFIED WORKSFORME
Alias: None
Product: uml
Classification: Unclassified
Component: Design Center (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-22 07:07 UTC by bugbridge
Modified: 2008-06-10 22:25 UTC (History)
3 users (show)

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 bugbridge 2006-06-22 07:07:01 UTC
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
Comment 1 Peter Lam 2008-06-10 21:41:01 UTC
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 ();

}
Comment 2 Peter Lam 2008-06-10 22:22:59 UTC
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.
Comment 3 Peter Lam 2008-06-10 22:25:25 UTC
verified in 6.5.