Project: JDT
Bug 285573 [quick fix] Wrong quickfix proposal for operations involving double and Integer
Reported: 2009-08-04 08:47:07 | Status: resolved fixed

Build ID: I20090803-1800 Steps To Reproduce: Integer value = 4711; double test = 47d; value = value + test; //Line3: Error Line 3 is marked with a compilation error (Type mismatch: cannot convert from double to Integer) and one of the quick fixes suggest "Add a cast to 'Integer'". However, this is wrong and will not fix the compilation error as double to Integer cast is not allowed. More information:

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/UnresolvedMethodsQuickFixTest.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/Bindings.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMessages.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/TypeMismatchSubProcessor.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/CastCorrectionProposal.java