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

fabric8-launcher/launcher-booster-catalog-service

Repository files navigation

Booster Catalog Service

CircleCI License Maven Central

This project contains the service classes for the booster-catalog repository

Build and Run the Unit Tests

  • As we are using `git bundle`s to test Git operations using in-memory Git server we switched to [Git LFS](https://git-lfs.github.com/). Follow the instruction there to install on your machine. Once you have that set up, enable it for the repository:

$ git lfs install
$ git lfs pull
  • Execute:

    $ mvn clean install

IDE Setup

  • Nullability (IntelliJ) - To set up IntelliJ to properly handle @Nonnull and @Nullable annotations you should go to the "Editor → Inspections" in the "Settings" dialog and make the following changes (leave the rest at their default values):

    • Mark "Suggest @Nullable annotation for methods…​"

    • In "Configure annotations" make sure to select both "javax.annotation." types and click "OK"

    • Unmark "Don’t report assertions with conditions…​"

    • You can set the "Severity" to "Error" to better see what code is violating the nullability contracts, but unfortunately that also flags some otherwise harmless code. Decide for yourself what you prefer.

Contributing Code

  • Nullability - Make sure that for each package you create you also add a package-info.java file with at least the following contents:

    @javax.annotation.ParametersAreNonnullByDefault
    @io.fabric8.launcher.booster.util.FieldsAreNonnullByDefault
    @io.fabric8.launcher.booster.util.ReturnTypesAreNonnullByDefault
    package name.of.your.package;

    You can use IntelliJ’s "Analyze → Infer Nullity" feature to check your code for places where you might need a @Nullable or @Nonull annotation.

    Try to use @Nullable only in those cases where you know you really need to use null values.