Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 544817

Summary: [12] Rename option not available inside a switch expression
Product: [Eclipse Project] JDT Reporter: Kalyan Prasad Tatavarthi <kalyan_prasad>
Component: UIAssignee: Noopur Gupta <noopur_gupta>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, noopur_gupta, sarika.sinha
Version: 4.11   
Target Milestone: BETA J12   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 539080    
Bug Blocks: 545120    

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.