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 186054 - [69cat] "Assign Return Value to New Variable" appears twice
Summary: [69cat] "Assign Return Value to New Variable" appears twice
Status: RESOLVED DUPLICATE of bug 185835
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-12 22:02 UTC by matthies
Modified: 2010-05-13 05:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matthies 2010-05-12 22:02:16 UTC
The "Assign Return Value to New Variable" hint appears twice on the same expression, under certain circumstances. Example:

    import java.util.Collections;
    import static java.util.Collections.*;

    public class Test
    {
        public Object getFoo() { return null; }

        {
            getFoo();
            emptyList();
            this.getFoo();
            Collections.emptyList();
        }
    }

1) Move the caret on the "getFoo" word of the first getFoo() invocation
2) Press Alt+Enter -> the hint appears (once)
3) Press Escape to close the hint
4) Press Alt+Enter again -> now the hint appears twice
Further repetitions stay at two occurrences of the hint.

This also happens when the caret is on the first "emptyList", on "this" or on "Collections". It does not happen on the prefixed "getFoo" and the prefixed "emptyList".

(NB 6.9 Beta)
Comment 1 Jan Lahoda 2010-05-13 05:59:30 UTC
Thanks for very precise steps to reproduce. Duplicate of bug #185835.

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