Bug 552468 - "Split variable declaration" can eat code
Summary: "Split variable declaration" can eat code
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.13   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-28 03:34 EDT by Luke Hutchison CLA
Modified: 2023-10-09 05:33 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Hutchison CLA 2019-10-28 03:34:19 EDT
for this code:

        Thread consumerThread = new Thread("Yielder-Consumer-" + tid) {
            @Override
            public void run() {
                while (true) {
                    head = boundedQueue.take()  //(*)
                }
            }
        };

Line (*) is missing an ending semicolon. If you are in the lefthand part of the line (at "head"), I expected Quickfix-Enter to fill in the type of "head" (which I did out of muscle memory), but this leaves only:

        Thread consumerThread
        consumerThread = ;
        };

Actually there is only one Quickfix: "Split variable declaration", and it gets applied to "consumerThread =", not "head =", even though the cursor is over the left hand side of the (admittedly incomplete) "head =" assignment.

Either way, a quickfix should not eat code!
Comment 1 Eclipse Genie CLA 2021-10-18 06:34:07 EDT
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.

If you have further information on the current state of the bug, please add it. 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.
Comment 2 Luke Hutchison CLA 2021-10-18 12:57:15 EDT
Ping, to keep the bug open
Comment 3 Eclipse Genie CLA 2023-10-09 05:33:26 EDT
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.

If you have further information on the current state of the bug, please add it. 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.