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 90176 - Attribute from nested class has 'A::B' type in source
Summary: Attribute from nested class has 'A::B' type in source
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Craig Conover
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2006-11-28 13:26 UTC by Alexandr Scherbatiy
Modified: 2007-10-19 21:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sucessful source elements and resulting code gen screenshot (35.51 KB, image/png)
2006-11-29 19:23 UTC, Craig Conover
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2006-11-28 13:26:52 UTC
Steps to reproduce:
- Create a Class diagram
- Put a Class element on the diagram and name it A
- Put a Class element on the diagram and name it B
- Insert 'private B b' atribute into the B Class element
- Draw a Nested link from B to A
- Generate code for UML project
   The generated code is:
  -----------------------------------------------------
  public class A {

    public A() {
    }
    public class B {
        private A::B b;
        public B() {
        }

        public A::B getB() {
            return b;
        }

        public void setB(A::B val) {
            this.b = val;
        }
    }

  }
  -----------------------------------------------------
 
 Nested 'B' class has 'private A::B b;' in source.
Comment 1 Craig Conover 2006-11-28 21:24:30 UTC
The "::" are now just "."
Comment 2 Alexandr Scherbatiy 2006-11-29 14:10:37 UTC
The issue is reproduced in build ide-coco-061128_11-ml.zip.
Comment 3 Craig Conover 2006-11-29 19:22:07 UTC
It is working for me. Is there something I am not doing to reproduce properly?
Maybe OS or other environmental difference. I am testing on WinXP, JDK 1.5.06.

See attached screenshot for my diagram source elements and code gen results.
Comment 4 Craig Conover 2006-11-29 19:23:13 UTC
Created attachment 36372 [details]
Sucessful source elements and resulting code gen screenshot
Comment 5 Peter Lam 2006-11-29 20:19:49 UTC
I just verified with both builds 061128_11 & 061129_1 and the problem is
reproducible in both builds.
Comment 6 Craig Conover 2006-11-29 20:21:34 UTC
I need more to go on. Is there something I am missing here that might help me
reproduce it? It works perfect for me.
Comment 7 Peter Lam 2006-11-29 20:42:11 UTC
I just followed the exact steps from the description and it's reproducible for
me. I can't see anything extra needed. Have you tried doing it from a fresh
userdir to just make sure?
Comment 8 Craig Conover 2006-11-30 01:44:57 UTC
I think the difference in my testing was that I wasn't using the default package
and therefore, a slightly different code path was used.

Now it works whether in the default package or otherwise.
Comment 9 Alexandr Scherbatiy 2006-11-30 10:31:16 UTC
verified