Bug 544817 - [12] Rename option not available inside a switch expression
Summary: [12] Rename option not available inside a switch expression
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.11   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: BETA J12   Edit
Assignee: Noopur Gupta CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 539080
Blocks: 545120
  Show dependency tree
 
Reported: 2019-02-26 07:03 EST by Kalyan Prasad Tatavarthi CLA
Modified: 2019-03-07 03:19 EST (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 Kalyan Prasad Tatavarthi CLA 2019-02-26 07:03:13 EST
In the code below

String aa(Day day) {
	
    String today = switch (day) {
    case SATURDAY,SUNDAY :
        String str= "alc";
        System.out.println(str);
	break "Weekend";
    case MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY :
	break "Working";
    default :
	throw new IllegalArgumentException("Invalid day: " + day.name());
    };
  return today;
}

In the baove code snippet, select str and press Ctrl+1. The rename option is not available on it.
select str and Right click Refactor -> Rename. nothing happens.
Comment 1 Noopur Gupta CLA 2019-02-26 07:15:21 EST
Should be handled with the fix for bug 539080.
Comment 2 Noopur Gupta CLA 2019-03-07 03:19:24 EST
Fixed with bug 539080.