Project: JDT
Bug 48732 ChangeTypeRefactoring: shouldn't create Error exception
Reported: 2003-12-15 06:30:59 | Status: resolved fixed

I20031211 The method collectAffectedUnits contains shouldn't contain code like if (selectedMethod == null){ throw new Error(RefactoringCoreMessages.getString ("ChangeTypeAction.exception")); //$NON-NLS-1$ } Bindins.finsMethod can return null and the code should handle the case and not throw an error which isn't very helpful for the user. So please check this in checkActivation/checkInput and generate a corresponding refactoring status.

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/ChangeTypeRefactoring/negative/A_testObjectReturnType_in.java org.eclipse.jdt.ui.tests.refactoring/resources/ChangeTypeRefactoring/negative/A_testObjectReturnType_out.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ChangeTypeRefactoringTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeTypeRefactoring.java