Bug 500209

Summary: [null] Refactoring ignores @NonNullByDefault
Product: [Eclipse Project] JDT Reporter: Clovis Seragiotto <clovis.seragiotto>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: REOPENED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: stephan.herrmann
Version: 4.7Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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
.