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.
Original status: 1-Dispatched; Suggested Status: NEW Original submitter: sunflower Description: Steps to reproduce: - Do Reverse Engineering of 'testLoopFor' method and create a Sequence diagram: --------------------------------------------------------------- public void testLoopFor(){ String parse = "1 2 3 4 5"; String res = ""; for( StringTokenizer token = new StringTokenizer(parse); token.hasMoreTokens(); ){ res += token.nextToken(); } } --------------------------------------------------------------- - There is the ':token' Lifeline on the Sequence diagram. The name of Lifeline is incorrect wrong because there is no 'token' Class in the project. The name of Lifeline should be 'token: StringTokenizer' (See attached picture).
Created attachment 31191 [details] for loop test
Issue 78409 - MethodLoopStateHandler.createSubStateHandler - the pOptions was a dead call. The addInitializerState seemed to correctly add the new StateHandler to the stack, but then "this" (MehodLoopStateHandler) was returned. So added the call to retrieveStatementHandler to retrieve the handler created to handle the variable definition. Also, of course, removed the retVal=this line.
verified