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 79081 - RE Operation: Nested switch blocks are parsed incorrectly
Summary: RE Operation: Nested switch blocks are parsed incorrectly
Status: NEW
Alias: None
Product: uml
Classification: Unclassified
Component: Reverse Engineering (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-26 13:22 UTC by Alexandr Scherbatiy
Modified: 2009-05-25 21:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
nested switch blocks (91.08 KB, image/png)
2006-06-26 13:24 UTC, Alexandr Scherbatiy
Details
nested switch blocks (Latest IDE) (26.62 KB, image/png)
2007-02-26 11:05 UTC, Alexandr Scherbatiy
Details
NPE when RE the operation with switch block (17.50 KB, text/plain)
2007-02-28 14:02 UTC, Alexandr Scherbatiy
Details
The sequence diagram in NB6 is incorrect too. It is different from nb5.5.1. Attached the diagram which is generated with build 070718 (12.85 KB, image/gif)
2007-07-18 23:46 UTC, Sherry Zhou
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2006-06-26 13:22:50 UTC
Steps to reproduce:


- Do Reverse Engineering of 'void test()'  method from
  'Test' class and create a Sequence diagram:
  ---------------------------------------------------------------     
  public class Test {
    enum DAY {
        SUNDAY,
        MONDAY,
        TUESDAY,
        WEDNESDAY,
        THURSDAY,
        FRIDAY,
        SATURDAY
    }
    
    public void test(){
        
        int n = 20;
        String name = "";
        DAY day = DAY.MONDAY;
        
        switch(day){
            case SUNDAY:  name = day.toString();
            switch(n){
                case 0:  day = DAY.SUNDAY;
                case 1:  day = DAY.MONDAY; break;
                default: day = DAY.TUESDAY;
            }
            
            case MONDAY:  name = day.name();
            switch(n){
                case 2:  day = DAY.TUESDAY;
                case 3:  day = DAY.MONDAY; break;
                default: day = DAY.SUNDAY;
            }
            break;
            default:  name = day.getClass().getName();
        }
    }      
  }

  ---------------------------------------------------------------     

  The outer Combined fragment has 3 interaction operands on the Sequence 
  diagram.
  The fist operand has '[n]' expression  instead of '[ day = SUNDAY ]'.
  The second operand has '[n]' expression  instead of '[ day = MONDAY ]'.
Comment 1 Alexandr Scherbatiy 2006-06-26 13:24:57 UTC
Created attachment 31376 [details]
nested switch blocks
Comment 2 Alexandr Scherbatiy 2007-02-26 11:05:32 UTC
Created attachment 38898 [details]
nested switch blocks (Latest IDE)
Comment 3 Alexandr Scherbatiy 2007-02-28 14:02:12 UTC
Created attachment 38976 [details]
NPE when RE the operation with switch block
Comment 4 Sherry Zhou 2007-07-18 23:46:14 UTC
Created attachment 45353 [details]
The sequence diagram in NB6 is incorrect too. It is different from nb5.5.1. Attached the diagram which is generated with build 070718
Comment 5 Sergey Petrov 2008-05-14 15:17:53 UTC
as for graphics issue: it's much better now(look), but not yet perfect, at least nested cfs are located inside correct
operands, but still may be sometimes in wrong ordering with messages. in fact it's the issue with combined fragments
which do not contain messages, usually with primitive types.
yet have [n] instead of correct expressions, it's second issue is model and both amy need to be separated.