Project: JDT
Bug 129912 [clean up] no brackets only for 'return' and 'throws'
Reported: 2006-03-01 05:10:50 | Status: resolved fixed

20060301 We should offer a third option where brackets in control stataments are only removed when the statement is a 'return' or 'throws'. This is a common code pattern for early exits or argument checking. if (type == null) throw new InvalidArgumentException("type must not be null");

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ControlStatementsFix.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpRefactoringWizard.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/ControlStatementsCleanUp.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/MultiFixMessages.java