SLING-7798 Switch from JSR-305 annotations to JetBrains Nullable/NotNull annotations
diff --git a/pom.xml b/pom.xml
index fe9ed34..daa6eb6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -278,9 +278,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <version>2.0.0</version>
+ <groupId>org.jetbrains</groupId>
+ <artifactId>annotations</artifactId>
+ <version>16.0.2</version>
<scope>provided</scope>
</dependency>
diff --git a/src/main/java/org/apache/sling/distribution/serialization/impl/avro/AvroContentSerializer.java b/src/main/java/org/apache/sling/distribution/serialization/impl/avro/AvroContentSerializer.java
index 5c21d8d..f508761 100644
--- a/src/main/java/org/apache/sling/distribution/serialization/impl/avro/AvroContentSerializer.java
+++ b/src/main/java/org/apache/sling/distribution/serialization/impl/avro/AvroContentSerializer.java
@@ -18,7 +18,6 @@
*/
package org.apache.sling.distribution.serialization.impl.avro;
-import javax.annotation.Nonnull;
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;
@@ -33,7 +32,6 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-
import org.apache.avro.Schema;
import org.apache.avro.file.DataFileReader;
import org.apache.avro.file.DataFileWriter;
@@ -53,6 +51,7 @@
import org.apache.sling.distribution.serialization.DistributionContentSerializer;
import org.apache.sling.distribution.serialization.DistributionExportFilter;
import org.apache.sling.distribution.serialization.DistributionExportOptions;
+import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -181,7 +180,7 @@
return avroResources;
}
- private void persistResource(@Nonnull ResourceResolver resourceResolver, AvroShallowResource r) throws PersistenceException {
+ private void persistResource(@NotNull ResourceResolver resourceResolver, AvroShallowResource r) throws PersistenceException {
String path = r.getPath().toString().trim();
String name = path.substring(path.lastIndexOf('/') + 1);
String substring = path.substring(0, path.lastIndexOf('/'));