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 82473 - Changing interface operation return type removes operation body from child
Summary: Changing interface operation return type removes operation body from child
Status: VERIFIED INVALID
Alias: None
Product: uml
Classification: Unclassified
Component: Synchronization (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Kris Richards
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-11 11:27 UTC by Alexandr Scherbatiy
Modified: 2006-10-16 09:35 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-11 11:27:24 UTC
Steps to reproduce:

- Create a Class diagram
- Put Interface element on the diagram and name it 'MyInterface'
- Insert 'void op()' operation into Interface element
- Put Class element on the diagram and name it 'MyClass'
- Draw 'Implementation' link from Class element to Interface element
- Go to source of 'MyClass' class element
- Insert 'System.out.println("Hello World!");' line into 'void op()' 
  operation
  ----------------------------------------------------------
  public class MyClass implements MyInterface{
    public MyClass() {
    }

    public void op() {
        System.out.println("Hello World!");
    }
  }
  ----------------------------------------------------------
- Go to the diagram
- Select 'MyInterface' interface element
- Change 'op' operation type from 'void' to 'int' for Interface element
- Go to the source of 'MyClass' class element
  'op' operation body was removed

  ----------------------------------------------------------
  public class MyClass implements MyInterface{
    public MyClass() {
    }

    public int op() {
        return 0;
    }
  }
  ----------------------------------------------------------
Comment 1 Craig Conover 2006-08-14 19:09:34 UTC
Review: bug is as stated. Source code body should never be overwritten, or at
least should be prompted to do something with it, like leave in method, but
comment it out, or keep old operation but commented out.
Comment 2 Kris Richards 2006-10-06 22:29:11 UTC
with the new "generate code" feature, this bug is no longer valid.
Comment 3 Kris Richards 2006-10-06 22:29:53 UTC
this bug is no longer valid
Comment 4 Andrew Korostelev 2006-10-16 09:35:26 UTC
all-nbms-griffin-061015