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 78712

Summary: Default multiplicity attribute value is not correctly copied
Product: uml Reporter: bugbridge <bugbridge>
Component: SynchronizationAssignee: issues@uml <issues>
Status: NEW ---    
Severity: blocker CC: sunflower
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description bugbridge 2006-06-21 05:25:00 UTC
Original status: 1-Dispatched; Suggested Status: NEW

Original submitter: sunflower

Description:
Netbeans 5.5 Preview (build 2006.02.09)

Steps to reproduce:

- Add a class diagram
- Put a class element on the diagram and name it 'Class1'
- Put a class element on the diagram and name it 'Class2'
- Go to source code of 'Class1' java class
- Insert 'int[] array = new int[] { 1, 2} ;'  attribute
  into the 'Class1' java class
- Go to the class diagram
- Copy 'array' attribute from  'Class1' to 'Class2'
     - Select 'array' attribute
     - Press and hold CTRL
     - Drag 'package int array[0..*]' from one class element to another
- Build a java project
  The java project is not compiled


  Compiling 1 source file to JavaApplication\build\classes
  JavaApplication\src\Class2.java:4: '[' expected
    int[] array = new int  {1, 2};
  JavaApplication\src\Class2.java:4: illegal start of expression
    int[] array = new int  {1, 2};
  2 errors
  BUILD FAILED (total time: 0 seconds)

'Class2' java class contains wrong default value:

    int[] array = new int  {1, 2};