Name.remal.insert null checks

Plugin class: name.remal.gradle_plugins.plugins.null_checks.InsertNullChecksPlugin

plugins {
    id 'name.remal.insert-null-checks' version '1.0.178'
}
plugins {
    id("name.remal.insert-null-checks") version "1.0.178"
}

 

This plugin works only if java plugin is applied.

The plugin applies these plugins:

 

This plugin processes all compiled JVM classes and for all non-null parameters adds Objects.requireNonNull() check.

The plugin support all annotations listed here. It's done by comparing simple class name, so exact package name can be anything.

JSR 305 annotations are also supported including javax.annotation.meta.TypeQualifierNickname and javax.annotation.meta.TypeQualifierDefault. For example package-info annotation org.springframework.lang.NonNullApi is handled correctly for all classes inside the package.

JDT annotations are also supported including org.eclipse.jdt.annotation.NonNullByDefault.

The plugin doesn't process Kotlin classes, as Kotlin produces null checks itself.