Replace JSR305 null-safe annotations by SpotBugs annotations

Reason is that JSR305 annotations cannot be used in a modular environment due to split package issues.
This commit is contained in:
Richard Körber
2020-06-02 12:42:49 +02:00
parent c5e85f0101
commit b32f03b23a
63 changed files with 350 additions and 318 deletions

View File

@@ -17,8 +17,6 @@ import java.io.IOException;
import java.util.Arrays;
import java.util.Objects;
import javax.annotation.ParametersAreNonnullByDefault;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.ClientProtocolException;
@@ -33,7 +31,6 @@ import org.shredzone.acme4j.toolbox.JSONBuilder;
/**
* The BammBamm client connects to the pebble-challtestsrv.
*/
@ParametersAreNonnullByDefault
public class BammBammClient {
private static final HttpClient CLIENT = HttpClients.createDefault();

View File

@@ -0,0 +1,23 @@
/*
* acme4j - Java ACME client
*
* Copyright (C) 2020 Richard "Shred" Körber
* http://acme4j.shredzone.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
@ReturnValuesAreNonnullByDefault
@DefaultAnnotationForParameters(NonNull.class)
@DefaultAnnotationForFields(NonNull.class)
package org.shredzone.acme4j.it;
import edu.umd.cs.findbugs.annotations.DefaultAnnotationForFields;
import edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameters;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.ReturnValuesAreNonnullByDefault;