Skip to content
Success

Changes

Summary

  1. Bug 574824 - [cleanup] Switch expression cleanup generates invalid code (details)
Commit 0e7d9bae45409b95b027ba9a791e834c79024db6 by Jeff Johnston
Bug 574824 - [cleanup] Switch expression cleanup generates invalid code

- fix SwitchExpressionsFixCore.SwitchStatementsFinder to handle
  a switch case that falls off the end of the statement (i.e. no break)
- fix SwitchExpressionsFixCore.SwitchExpressionsFixOperation.rewriteAST()
  method to properly copy over type and final modifier of existing
  statement
- add new test to CleanUpTest14

Change-Id: I4238530e7782eb6bb3278d0cce82ecbdbcc1d9b5
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/183069
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Tested-by: Jeff Johnston <jjohnstn@redhat.com>
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
The file was modified org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest14.java
The file was modified org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/SwitchExpressionsFixCore.java