Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 416864

Summary: Erroneous quick fix suggestion - suggests adding import instead of removing argument
Product: [Eclipse Project] JDT Reporter: Palmer Eldritch <the.ubik>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 4.2.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
pic showing the erroneous quick fix
none
the file (wip) where the error occured
none
static imports + number of arguments quick fix bug none

Description Palmer Eldritch CLA 2013-09-09 13:04:44 EDT
Created attachment 235318 [details]
pic showing the erroneous quick fix

The quick fix in the picture is in a file that already contains a (static) import for listToLong(List<Byte>) - it should offer to remove the extra argument to match and not offer to add the existing import

Eclipse Java EE IDE for Web Developers.

Version: Kepler Release
Build id: 20130614-0229
Comment 1 Palmer Eldritch CLA 2013-09-09 13:05:38 EDT
Created attachment 235319 [details]
the file (wip) where the error occured
Comment 2 Palmer Eldritch CLA 2013-11-17 07:42:38 EST
Created attachment 237509 [details]
static imports + number of arguments quick fix bug

Another occurrence (see pic): I changed the method invocation from triggerDialogNotification(5 arguments)  to triggerNotification(4 arguments)
Eclipse quick fix suggested to add static import for triggerNotification (both those methods are in a class that I have eclipse to import statically) - and when I added the static import :

1. the static import for triggerDialogNotification _is not reported as unused_
2. quick fix keeps asking for static import instead of asking to correct the arguments

Saving removes the static import for triggerDialogNotification (I have organize imports on save) but quick fix still asks for static import

This is a fulltime bug and may prove a can of worms - please verify
Comment 3 Eclipse Genie CLA 2020-02-10 13:12:29 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.