Bug 318180 - [content assist] Auto-complete insertion of anonymous class produces superfluous semicolon
Summary: [content assist] Auto-complete insertion of anonymous class produces superflu...
Status: CLOSED DUPLICATE of bug 280801
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-28 10:06 EDT by Matthew Wilson CLA
Modified: 2010-07-26 03:03 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Wilson CLA 2010-06-28 10:06:17 EDT
Build Identifier: 20100617-1415

When I insert an anonymous inner class using the autocomplete feature, a superfluous semicolon is added after the closing brace.  This semicolon is only required when the class is used in a field or local variable declaration, and not when the instance is used as a method parameter or as part of another expression.

This issue has occurred for me from at least 20090619-0625 to 20100617-1415.


Reproducible: Always

Steps to Reproduce:
1. Type:

foo(new ActionListener);

2. Place cursor after "ActionListener".
3. Press ctrl-space for autocomplete and choose "Anonymous Inner Type ..."
4. Witness that the code now has a superfluous (and, indeed, incorrect) semicolon on the last line:

};);

I expect:

});
Comment 1 Srikanth Sankaran CLA 2010-07-25 22:49:22 EDT
Is this a duplicate of bug 280801 ?
Comment 2 Dani Megert CLA 2010-07-26 03:03:26 EDT

*** This bug has been marked as a duplicate of bug 280801 ***