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

Bug 419952

Summary: [quick fix] 'Remove invalid modifiers' removes additional code
Product: [Eclipse Project] JDT Reporter: Noopur Gupta <noopur_gupta>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: manju656
Version: 3.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Noopur Gupta CLA 2013-10-21 04:30:56 EDT
package com.test;

@Deprecated // test[1]
final interface Test {
	int foo(int i);
}
-----------------------
package com.test;

@Deprecated
// test[2]
final interface Test {
	int foo(int i);
}
----------------------

1. Apply the quick fix 'Remove invalid modifiers'.

2. In the first example, newline is also removed along with 'final' which results in compile errors:
----------------------
package com.test;

@Deprecated //test[1] interface Test {
	int foo(int i);
}
----------------------

3. In the second example, the comment is also lost:
----------------------
package com.test;

@Deprecated interface Test {
	int foo(int i);
}
----------------------
Comment 1 Martin Mathew CLA 2013-10-21 05:07:56 EDT
Same behavior in Eclipse 3.4 also.
Comment 2 Eclipse Genie CLA 2020-03-28 12:42:18 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. 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.