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

Bug 508221

Summary: @Nullable cannot be assigned to a qualified type
Product: [Eclipse Project] JDT Reporter: Frank Benoit <frank.rene.benoit>
Component: UIAssignee: Till Brychcy <register.eclipse>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: register.eclipse
Version: 4.7   
Target Milestone: 4.7 M4   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Frank Benoit CLA 2016-11-25 16:42:37 EST
Having a type reference qualified or fully qualified, activates an error
1. this fail:
public class Outer {
	public static class Inner {
	}
	public @Nullable Outer.Inner get(){
		return null;
	}
}

2. this is OK
public class Outer {
	public static class Inner {
	}
	public @Nullable Inner get(){
		return null;
	}
}

Message:
Type annotations are not allowed on type names used to access static members	Outer.java
Comment 1 Till Brychcy CLA 2016-11-25 17:20:37 EST
The syntax is:
	public  Outer.@Nullable Inner get(){
		return null;
	}

(A quick fix that moves the annotation to this location is being done in bug 506638)