Bug 500209 - [null] Refactoring ignores @NonNullByDefault
Summary: [null] Refactoring ignores @NonNullByDefault
Status: REOPENED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2016-08-24 09:57 EDT by Clovis Seragiotto CLA
Modified: 2020-06-10 03:34 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Clovis Seragiotto CLA 2016-08-24 09:57:30 EDT
By refactoring the class Bar below (using "Refactor/Move Type to New File"), the class Bar in the new file created does not get any @NonNull or @NonNullByDefault, resulting in a warning at the site where "foo" is called ("The expression of type 'Object' needs unchecked conversion to conform to '@NonNull Object'")

@NonNullByDefault({ PARAMETER, RETURN_TYPE, FIELD, TYPE_PARAMETER, TYPE_BOUND, TYPE_ARGUMENT, ARRAY_CONTENTS })
class Foo {
    static void foo(Object a) {
        System.out.println(a);
    }
    
    static class Bar {
        static void bar(Object b) {
            foo(b);
        }
    }
}

--- AFTER ---
Comment 1 Eclipse Genie CLA 2020-02-01 16:10:36 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.
Comment 2 Stephan Herrmann CLA 2020-02-02 08:16:38 EST
This is a valid request.
Comment 3 Stephan Herrmann CLA 2020-06-10 03:34:12 EDT
.