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 236189 - Illegal qualified enum names after Move refactoring
Summary: Illegal qualified enum names after Move refactoring
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
: 256524 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-20 13:00 UTC by Svata Dedic
Modified: 2016-03-03 13:55 UTC (History)
1 user (show)

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 Svata Dedic 2013-09-20 13:00:14 UTC
I've tried to move an inner class to outer level (refactoring action), the class contains a switch() on enum-type expression.
The case constants become qualified after the refactor, i.e.

        switch (kind) {
            case IntroduceKind.CREATE_CONSTANT:
                return "IntroduceConstant"; //NOI18N
            case IntroduceKind.CREATE_VARIABLE:
                return "IntroduceVariable"; //NOI18N
            default:
                throw new IllegalStateException();
        }
    }

which is an error. The referenced enum is a public toplevel class in the same package.

(for reproduction: I've tried to move org.netbeans.modules.java.hints.introduce.IntroduceHint.IntroduceFix to package-level)
Comment 1 Ralph Ruijs 2015-03-24 11:18:25 UTC
changeset:   a113a8718b24
user:        Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date:        Tue Mar 24 12:17:20 2015 +0100
summary:     #236189 - Illegal qualified enum names after Move refactoring
Comment 2 Quality Engineering 2015-03-25 03:22:59 UTC
Integrated into 'main-silver', will be available in build *201503250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a113a8718b24
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #236189 - Illegal qualified enum names after Move refactoring
Comment 3 Ralph Ruijs 2016-03-03 13:55:50 UTC
*** Bug 256524 has been marked as a duplicate of this bug. ***