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 78377 - RE Operation: Chain of method calls is not properly parsed
Summary: RE Operation: Chain of method calls is not properly parsed
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Reverse Engineering (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Kris Richards
URL:
Keywords:
Depends on:
Blocks: 173077
  Show dependency tree
 
Reported: 2006-06-19 22:36 UTC by bugbridge
Modified: 2009-12-09 07:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sequence Diagram showing problem (24.88 KB, image/png)
2006-12-05 23:09 UTC, Kris Richards
Details
Sequence diagram (27.09 KB, image/png)
2007-03-21 12:36 UTC, Alexandr Scherbatiy
Details
sequence diagram (22.25 KB, image/png)
2007-09-06 16:51 UTC, Peter Lam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugbridge 2006-06-19 22:36:21 UTC
Original submitter: sunflower

Description:
Coke build: 2006.04.27

Steps to reproduce:

- Do Reverse Engineering of 'test' method from
  'Test' class and create a Sequence diagram:
  ---------------------------------------------------------------     
  import java.util.Iterator;
  import java.util.LinkedList;

  public class Test {
    
    void test(){
        String str = "".trim();
        Iterator iter = new LinkedList().iterator();
        boolean res = iter.next().equals(str);
    }
  }
  ---------------------------------------------------------------     

- 'public void trim()' message is incorrectly called from 'self:Test' Lifeline.
  'public boolean equals(Object Unnamed)' message is incorrectly called from
'self:Test' Lifeline.
 
   Unnecessary  'AbstractSequentialList' Lifeline is created.
Comment 1 Kris Richards 2006-12-05 23:09:00 UTC
Created attachment 36500 [details]
Sequence Diagram showing problem
Comment 2 Kris Richards 2007-03-16 21:34:38 UTC
Issue 78377. In MethodCallExpression.sendOperationEvents had to add check to see if string constant was 
being accessed as a static instance. Added getStringInstance(IREClass reClass) to return instance in this 
case.
Comment 3 Alexandr Scherbatiy 2007-03-21 12:28:28 UTC
  -  The 'public void trim()' message is incorrectly connected to ':Test' lifeline
      instead of ':String'
  -  The 'public boolean equals(Object obj)' message is not shown at all
     on the diagram
Comment 4 Alexandr Scherbatiy 2007-03-21 12:36:44 UTC
Created attachment 39747 [details]
Sequence diagram
Comment 5 Peter Lam 2007-03-21 16:37:55 UTC
waived for NB5.5 release.
Comment 6 Kris Richards 2007-06-08 20:38:09 UTC
fixed the "".trim() piece by forcing the return of a String Object when a literal is being used.
Comment 7 Kris Richards 2007-06-14 00:45:30 UTC
tracking info - the iter.next().equals() is not returning processing because it does not know that iter.next() is an Object. If it is coded as (iter.next()) or 
((Object)iter.next) the diagram shows fine.
Comment 8 Kris Richards 2007-08-02 05:00:57 UTC
This fix handles resolving nonqualified class names. This fix also requires the Java16 version 1.3+ library files.
Comment 9 Sherry Zhou 2007-08-03 22:20:24 UTC
In build 070803, sequence diagram is blank. The operation test's return type is shown as a
string of numbers and letters.
Comment 10 Kris Richards 2007-08-11 01:30:48 UTC
set parameter type for unknown return parameter is UMLParserUtilities.inMatchingParameter(*). This change fixes the issue, but the parameter type should not 
have to be set here. It should already be set. Need to find a better solution.
Comment 11 Peter Lam 2007-09-06 16:51:13 UTC
verified in beta1 build 070905. The iterator message should point to the "iter" instance but it's pointing to
":AbstractSequenctialList". See attached screenshot for the current result.
Comment 12 Peter Lam 2007-09-06 16:51:56 UTC
Created attachment 48297 [details]
sequence diagram
Comment 13 Kris Richards 2007-09-10 23:26:03 UTC
 In ObjectInstanceInformation.getMethodDeclaration, check to see if a super class has been returned as the owner from the SourceElementLocator. If so, set 
the owner back to the m_InstantiatedType.
Comment 14 Peter Lam 2007-09-15 02:19:49 UTC
can't verify. blocked by issue 115587.
Comment 15 Peter Lam 2007-09-20 08:00:57 UTC
verified in instrumented build 200709180324.