Bug 575705 - Package refactor loses null annotations
Summary: Package refactor loses null annotations
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.19   Edit
Hardware: PC Windows 10
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Kalyan Prasad Tatavarthi CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-30 03:24 EDT by Ed Willink CLA
Modified: 2024-05-08 14:49 EDT (History)
2 users (show)

See Also:


Attachments
Repro project (3.13 KB, application/x-zip-compressed)
2021-08-30 03:24 EDT, Ed Willink CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2021-08-30 03:24:44 EDT
Created attachment 287047 [details]
Repro project

The attached project demonstrates a refactoring corruption.

When Element.java is dragged and dropped from x.y.z1 to x.y.z3, Reference.java is corrupted from:

	List<@NonNull Element> list;

to

	List<x.y.z3.Element> list;

Seems like some bit of code cannot cope with the horrors of of qualified name annotations. Else there is a false assumption that @NonNullByDefault is in use. I never use it.

This bug has been present for a few years. I've only just got round to reporting it. Reproducible on RC1

Version: 2021-09 (4.21)
Build id: I20210825-1800

----

(And after the DND, Ctrl-Z reports cannot be undone.)
Comment 1 Adam Gent CLA 2022-05-17 11:34:57 EDT
I don't think this bug has anything to do with null analysis but just the handling of TYPE_USE annotations in generics as I just reproduced it with a dummy TYPE_USE annotation.

Basically the title should be:

"TYPE_USE annotations on generic type parameters are dropped on refactoring"
Comment 2 Eclipse Genie CLA 2024-05-08 14:49:13 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.