Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

support external annotations #4217

Closed
wants to merge 2 commits into from
Closed

support external annotations #4217

wants to merge 2 commits into from

Commits on Sep 24, 2017

  1. support external annotations

    This commit adds initial support for external annotations.
    
    There is a new project "eclipse-external-annotations" that must be
    imported in the Eclipse IDE.
    
    If added already some annotations:
    * JRE
       * Object.toString() returns a `@NonNull` String
       * Collections.empty... returns a `@NonNull` reference
       * Collections.singleton... returns a `@NonNull` reference
       * Collections.synchronized... returns a `@NonNull` reference
       * Collections.unmodifiable... returns a `@NonNull` reference
       * ... added a lot more ones while working and rebasing that branch.
    * slf4j
       * LoggerFactory.getLogger(...) returns a `@NonNull` reference
    
    If a project should use external annotations this needs to be configured
    for the Eclipse IDE in the project settings of each project.
    See [Configuring a project to use external annotations]
    Open the project settings and navigate to "Java Build Path", "Library"
    tab. Set the external annotation reference for "JRE System Library" and
    "Plug-in Dependencies".
    This has been already applied for the core and the core.things project.
    
    For the headless consumption a "dedicated path" is possible
    ("-annotationpath location").
    See [Headless consumption]
    This setting has been already added to the POM file.
    
    Add new annotations is very easy as it is supported by the IDE.
    See [Creating external annotations]
    
    [Configuring a project to use external annotations]: http://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-using_external_null_annotations.htm&cp=1_3_9_2&anchor=configure
    [Creating external annotations]: http://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-using_external_null_annotations.htm&cp=1_3_9_2&anchor=create
    [Headless consumption]: https://wiki.eclipse.org/JDT_Core/Null_Analysis/External_Annotations#Headless_consumption
    
    Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
    maggu2810 committed Sep 24, 2017
    Configuration menu
    Copy the full SHA
    1ac6f3c View commit details
    Browse the repository at this point in the history
  2. fix nullness annotations for ItemRegistryDelegate

    Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
    maggu2810 committed Sep 24, 2017
    Configuration menu
    Copy the full SHA
    3f60d93 View commit details
    Browse the repository at this point in the history