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

Bug 415918

Summary: [1.8][compiler][null] support null annotations on a type declaration
Product: [Eclipse Project] JDT Reporter: Stephan Herrmann <stephan.herrmann>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: shankhba
Version: 4.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Stephan Herrmann CLA 2013-08-26 19:17:33 EDT
Saying

  @NonNull class X { }

can be interpreted as a short-hand to the effect that every occurrence of 'X' actually
means '@NonNull X'.

(This is explicitly mentioned in the JSR 308 spec, see also bug 392238 comment 10).

Currently, ecj (BETA_JAVA8) rejects this declaration.

Depending on demand why may want to add this feature some time.
Comment 1 Stephan Herrmann CLA 2014-01-02 08:41:14 EST
See also bug 424727 (where I implemented resetting of null annotation tag bits on type declarations for now).
Comment 2 Stephan Herrmann CLA 2014-02-18 16:39:22 EST
Not for BETA_J8, maybe 4.4
Comment 3 Stephan Herrmann CLA 2015-01-13 18:20:59 EST
not a priority, currently