BAEL-4953: Fix FindBugs annotations (#10772)
Co-authored-by: Krzysztof Woyke <krzysztof.woyke.sp@lhsystems.com>
This commit is contained in:
parent
d72cdbc576
commit
bdd7733443
|
@ -26,6 +26,11 @@
|
|||
<version>${lombok.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>${findbugs.annotations.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
|
@ -41,6 +46,7 @@
|
|||
|
||||
<properties>
|
||||
<intellij.annotations.version>16.0.2</intellij.annotations.version>
|
||||
<findbugs.annotations.version>3.0.1</findbugs.annotations.version>
|
||||
<assertj-core.version>3.9.1</assertj-core.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package com.baeldung.nulls;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import edu.umd.cs.findbugs.annotations.Nullable;
|
||||
|
||||
public class FindBugsAnnotations {
|
||||
|
||||
public void accept(@NotNull Object param) {
|
||||
public void accept(@NonNull Object param) {
|
||||
System.out.println(param.toString());
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ public class FindBugsAnnotations {
|
|||
System.out.println("Printing " + param);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@NonNull
|
||||
public Object process() throws Exception {
|
||||
Object result = doSomething();
|
||||
if (result == null) {
|
||||
|
|
Loading…
Reference in New Issue