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 126584

Summary: incorrect default is generated for ArrayList<String>(10)
Product: uml Reporter: Ashizawa Kazunori <kasha>
Component: Reverse EngineeringAssignee: Viktor Lapitski <lvv>
Status: VERIFIED FIXED    
Severity: blocker CC: joyce2000jp, sustaining
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Ashizawa Kazunori 2008-02-04 04:00:37 UTC
incorrect default is generated for ArrayList<String>(10)

Product Version: NetBeans IDE 6.0.1 (Build 200801291616)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: SunOS version 5.11 running on sparc; ISO646-US; en (nb)

Create a Java Application project, and add a class as follows.

package javaapplication1;
import java.util.ArrayList;
import java.util.List;

public class NewClass {
    private List<String> m_list = new ArrayList<String>();
    private List<String> m_list2 = new ArrayList<String>(10);
}

Then, create a UML Reversed Engineered Java-Platform Model
project from the above project.

Class diagram created from NewClass element includes attribute
"m_list2", but its default is "new ArrayList<String>10(10)".

privete String m_list2[0..*] = new ArrayList<String>10(10)

It should be "new ArrayList<String>(10)"
Comment 1 Viktor Lapitski 2008-02-20 09:02:52 UTC
Fixed.

Checking in uml/core/src/org/netbeans/modules/uml/core/reverseengineering/parsin
gfacilities/translation/expression/ObjectCreationExpression.java;
/cvs/uml/core/src/org/netbeans/modules/uml/core/reverseengineering/parsingfacili
ties/translation/expression/Attic/ObjectCreationExpression.java,v  <--  ObjectCr
eationExpression.java
new revision: 1.2.6.2; previous revision: 1.2.6.1

and

author	lvv@netbeans.org
	Wed Feb 20 00:56:15 2008 -0800 (5 minutes ago)
changeset 68322	84cfa7d8f522
parent 68294	fa28ea86a60f
child 68323	85e23b5fe6a0
Fix for 126584 incorrect default is generated for ArrayList<String>(10) 
Comment 2 Joanne Lau 2008-02-25 17:16:32 UTC
Fix verified in 6.1 build 200802250003
Comment 3 Karthikeyan Rajeswaran 2008-03-08 21:16:02 UTC
The fix has been ported into the release601_fixes branch.

Checking in ObjectCreationExpression.java;
/cvs/uml/core/src/org/netbeans/modules/uml/core/reverseengineering/parsingfacilities/translation/expression/Attic/ObjectCreationExpression.java,v
 <--  ObjectCreationExpression.java
new revision: 1.4.10.1; previous revision: 1.4
done