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 83362 - Set/get methods are generated with ArrayList type for List attribute
Summary: Set/get methods are generated with ArrayList type for List attribute
Status: VERIFIED WORKSFORME
Alias: None
Product: uml
Classification: Unclassified
Component: Synchronization (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@uml
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2006-08-24 12:08 UTC by Alexandr Scherbatiy
Modified: 2006-11-02 16:04 UTC (History)
0 users

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 Alexandr Scherbatiy 2006-08-24 12:08:59 UTC
Steps to reproduce:

- Create a Class diagram
- Put a Class element to the diagram and name it 'MyClass'
- Go to the source of the class
- Add 'java.util.List' import into the source
  -------------------------------------------------------------
  import java.util.List;

  public class MyClass {
    public MyClass() {
    }
  }
  -------------------------------------------------------------
- Add 'List list' attribute into the source

  -------------------------------------------------------------
  import java.util.List;

  public class MyClass {
    List list;
    
    public MyClass() {
    }
  }
  -------------------------------------------------------------

  Set/get methods are generated with 'ArrayList' type instead of 'List' type

  -------------------------------------------------------------
  import java.util.List;

  public class MyClass {
    List list;
    
    public MyClass() {
    }

    public ArrayList getList() {
        return list;
    }

    public void setList(ArrayList val) {
        this.list = val;
    }
  }
  -------------------------------------------------------------
  The java project is not compiled:

Compiling 1 source file to JavaApplication\build\classes
JavaApplication\src\MyClass.java:10: cannot find symbol
symbol  : class ArrayList
location: class MyClass
    public ArrayList getList() {
JavaApplication\src\MyClass.java:14: cannot find symbol
symbol  : class ArrayList
location: class MyClass
    public void setList(ArrayList val) {
2 errors
BUILD FAILED (total time: 1 second)
Comment 1 Andrew Korostelev 2006-11-02 16:04:11 UTC
not reproducible with new RE/CodeGen
Comment 2 Andrew Korostelev 2006-11-02 16:04:33 UTC
verified in ide-coco-061101_7