Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 550770 - [13] Template for Switch case expression needs an update
Summary: [13] Template for Switch case expression needs an update
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.13   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: BETA J13   Edit
Assignee: Kalyan Prasad Tatavarthi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 548096
  Show dependency tree
 
Reported: 2019-09-05 01:31 EDT by Sarika Sinha CLA
Modified: 2019-09-09 06:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sarika Sinha CLA 2019-09-05 01:31:18 EDT
Currently the Switch case expression adds the code as  :
switch (key) {
	case value:
			
	    break type;

	default:
	    throw new IllegalArgumentException("Unexpected value: " + key);
}


I was expecting :
switch (key) {
	case value: {

	    yield type;
	}

	default:
	    throw new IllegalArgumentException("Unexpected value: " + key);
}

As with ":" there has to be a block statement for switch expression.
Comment 1 Eclipse Genie CLA 2019-09-09 06:27:52 EDT
New Gerrit change created: https://git.eclipse.org/r/149157