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 107484 - "fore" code template causes com.sun.tools.javac.util.CancelAbort exception, then java.lang.AssertionError
Summary: "fore" code template causes com.sun.tools.javac.util.CancelAbort exception, t...
Status: RESOLVED DUPLICATE of bug 109383
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-20 18:21 UTC by belkorin
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (104.88 KB, text/plain)
2007-06-20 18:22 UTC, belkorin
Details
the proper messages.log file. The other is not the right file. (200.25 KB, text/plain)
2007-06-20 18:28 UTC, belkorin
Details
log for fori crash (93.25 KB, text/plain)
2007-06-27 19:28 UTC, belkorin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description belkorin 2007-06-20 18:21:19 UTC
I was changing the variable name in the "fore" code completion template on nightly build 200706180000, and the IDE threw
a com.sun.tools.javac.util.CancelAbort at me.

messages.log is attached.
Comment 1 belkorin 2007-06-20 18:22:59 UTC
Created attachment 44090 [details]
messages.log
Comment 2 belkorin 2007-06-20 18:28:14 UTC
After trying to continue to go about my business after this, the IDE keeps firing java.lang.AssertionError messages at me.
Comment 3 belkorin 2007-06-20 18:28:57 UTC
Created attachment 44091 [details]
the proper messages.log file. The other is not the right file.
Comment 4 belkorin 2007-06-20 18:30:05 UTC
Uploaded the wrong log the first time. messages.log is correct, messages.log.2 is not.
Comment 5 Jiri Prox 2007-06-21 07:51:10 UTC
Can you provide a fragment of your code and exact description how you changed the variable name? Thanks
Comment 6 belkorin 2007-06-27 19:27:07 UTC
I think, specifically, the problem occurs when changing the the variable name of the object that you're iterating over.
This issue also occurs with the fori template.

Example

private LinkedHashSet<String> newAvailable(DefaultMutableTreeNode selected)
{
        fori
}

expands to (actions is an instance variable String array):

private LinkedHashSet<String> newAvailable(DefaultMutableTreeNode selected)
    {
        for (int i = 0; i < actions.length; i++) {
            String string = actions[i];
            
        }

    }

I hit tab to accept that i is my counter, and now actions is highlighted so I can change it. I try to start typing to
change it to selected.getChildNodes(), and when I do that, it throws the errors, and the editor goes to heck.
Comment 7 belkorin 2007-06-27 19:28:32 UTC
Created attachment 44481 [details]
log for fori crash
Comment 8 belkorin 2007-06-27 19:36:53 UTC
Should have said "selected.getChildCount()" in my previous message.
Comment 9 Tomas Zezula 2007-08-22 14:14:48 UTC
Duplicate of fixed issue #109383

*** This issue has been marked as a duplicate of 109383 ***