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 197050 - [70cat] "Assign Return Value To New Variable" doesn't work correctly for local classes
Summary: [70cat] "Assign Return Value To New Variable" doesn't work correctly for loca...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-24 17:06 UTC by matthies
Modified: 2013-07-01 15:57 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 2011-03-24 17:06:23 UTC
Example:

    public class Example
    {
        void foo()
        {
            class Test { }
            new Test();
        }
    }

Assign Return Value To New Variable on "new Test()" incorrectly results in:

            name.of.pkg.Example.foo.Test test = new Test();

The correct result would simply be:

            Test test = new Test();
Comment 1 Jan Lahoda 2013-06-28 11:41:09 UTC
Could you please try the current daily build? I tried, and it appears to produce the correct output. So probably this was fixed by some other change - possibly with our upgrade to JDK8 javac. I have added a test to ensure it is not going to be reintroduced:
http://hg.netbeans.org/jet-main/rev/7aca330c5f57

Thanks.
Comment 2 matthies 2013-06-28 11:56:13 UTC
I can confirm that it is fixed in 7.3.1.
Comment 3 Quality Engineering 2013-07-01 15:57:39 UTC
Integrated into 'main-silver', will be available in build *201307011244* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7aca330c5f57
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #197050: adding test