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 104487 - RE Operation: Expression label has wrong value for catch statement
Summary: RE Operation: Expression label has wrong value for catch statement
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Reverse Engineering (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Kris Richards
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2007-05-22 11:17 UTC by Alexandr Scherbatiy
Modified: 2007-10-10 18:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
wrong values for catch statements on sequence diagram (43.76 KB, image/png)
2007-05-22 11:20 UTC, Alexandr Scherbatiy
Details
sequence diagram missing message (56.23 KB, application/octet-stream)
2007-09-19 21:59 UTC, Peter Lam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2007-05-22 11:17:38 UTC
Steps to reproduce:

- Reverse Engineer  'void testBlockTryCatch()' method from 'TestBlockTryCatch' 
  class and create a Sequence diagram:

  ---------------------------------------------------------------
 public class TestBlockTryCatch {

    public void testBlockTryCatch() {
        try {
            Thread.sleep(1000);
        
        }catch(InterruptedException e){            
            System.out.println(e);
        }catch(Exception e){            
            System.out.println(e);
        }catch(Throwable e){            
            System.out.println(e);    
        }finally{
            Thread.currentThread().getName();
        }
    }

  }
  ---------------------------------------------------------------

- The expression label for 'catch(Exception e)' statement
  has wrong 'InterruptedExceptionException e' value

- The expression label for 'catch(Throwable e)' statement
  has wrong 'InterruptedExceptionExceptionThrowable' value
Comment 1 Alexandr Scherbatiy 2007-05-22 11:20:39 UTC
Created attachment 42638 [details]
wrong values for catch statements on sequence diagram
Comment 2 Alexandr Scherbatiy 2007-05-22 11:23:54 UTC
It is a regression from fix of issue 78414  There is an empty expression body
for 'catch' block
Comment 3 Kris Richards 2007-06-29 02:22:49 UTC
This is a terrible hack. But the dependency on the nodes dictated something similar. I do not know why the MethodExceptionProcessingStateHandler was 
using the identifier to store the exception names. Added a condition at the beginning of Idetifier.getIdentifierAsUML to check for a DUMMY_FLAG. If the 
dummy flag is present, the value of the last token is returned instead of the concatenated names of all the tokens.
Comment 4 Peter Lam 2007-09-19 21:58:45 UTC
verified in instrumented build 200709180324.
The message for "Thread.sleep(1000)" operation is missing from the generated sequence diagram. re-open.
Comment 5 Peter Lam 2007-09-19 21:59:21 UTC
Created attachment 49112 [details]
sequence diagram missing message
Comment 6 Kris Richards 2007-09-27 23:42:49 UTC
must have been fixed as a result of other code. Can no longer reproduce. (9/27)
Comment 7 Sherry Zhou 2007-10-10 18:41:59 UTC
verified in trunk build 20071010132728