From 90c06601cc4d004db4cdef17e5523601e106f1ec Mon Sep 17 00:00:00 2001
From: Nick Molcanov <32801560+nck-mlcnv@users.noreply.github.com>
Date: Mon, 6 Nov 2023 17:30:06 +0100
Subject: [PATCH] Change NotNull annotation
---
pom.xml | 6 +++++-
.../java/org/aksw/iguana/cc/metrics/ModelWritingMetric.java | 6 +++---
.../cc/metrics/impl/AggregatedExecutionStatistics.java | 6 +++---
.../aksw/iguana/cc/metrics/impl/EachExecutionStatistic.java | 4 ++--
.../aksw/iguana/commons/io/BigByteArrayInputStreamTest.java | 1 -
.../iguana/commons/io/BigByteArrayOutputStreamTest.java | 1 -
6 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/pom.xml b/pom.xml
index 7819cf29b..1ff04915b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -176,7 +176,11 @@
spring-context
6.0.11
-
+
+ javax.validation
+ validation-api
+ 2.0.1.Final
+
diff --git a/src/main/java/org/aksw/iguana/cc/metrics/ModelWritingMetric.java b/src/main/java/org/aksw/iguana/cc/metrics/ModelWritingMetric.java
index f696cf4ff..c20065f98 100644
--- a/src/main/java/org/aksw/iguana/cc/metrics/ModelWritingMetric.java
+++ b/src/main/java/org/aksw/iguana/cc/metrics/ModelWritingMetric.java
@@ -5,16 +5,16 @@
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
-import javax.annotation.Nonnull;
+import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;
public interface ModelWritingMetric {
- default @Nonnull Model createMetricModel(List workers, List[][] data, IRES.Factory iresFactory) {
+ default @NotNull Model createMetricModel(List workers, List[][] data, IRES.Factory iresFactory) {
return ModelFactory.createDefaultModel();
}
- default @Nonnull Model createMetricModel(List workers, Map> data, IRES.Factory iresFactory) {
+ default @NotNull Model createMetricModel(List workers, Map> data, IRES.Factory iresFactory) {
return ModelFactory.createDefaultModel();
}
}
diff --git a/src/main/java/org/aksw/iguana/cc/metrics/impl/AggregatedExecutionStatistics.java b/src/main/java/org/aksw/iguana/cc/metrics/impl/AggregatedExecutionStatistics.java
index 3b067af48..ed5ee4c92 100644
--- a/src/main/java/org/aksw/iguana/cc/metrics/impl/AggregatedExecutionStatistics.java
+++ b/src/main/java/org/aksw/iguana/cc/metrics/impl/AggregatedExecutionStatistics.java
@@ -12,7 +12,7 @@
import org.apache.jena.rdf.model.ResourceFactory;
import org.apache.jena.vocabulary.RDF;
-import javax.annotation.Nonnull;
+import javax.validation.constraints.NotNull;
import java.math.BigInteger;
import java.time.Duration;
import java.util.List;
@@ -28,7 +28,7 @@ public AggregatedExecutionStatistics() {
}
@Override
- @Nonnull
+ @NotNull
public Model createMetricModel(List workers, List[][] data, IRES.Factory iresFactory) {
Model m = ModelFactory.createDefaultModel();
for (var worker : workers) {
@@ -41,7 +41,7 @@ public Model createMetricModel(List workers, List workers, Map> data, IRES.Factory iresFactory) {
Model m = ModelFactory.createDefaultModel();
for (String queryID : data.keySet()) {
diff --git a/src/main/java/org/aksw/iguana/cc/metrics/impl/EachExecutionStatistic.java b/src/main/java/org/aksw/iguana/cc/metrics/impl/EachExecutionStatistic.java
index 7f7fc20b3..dcb22dd7f 100644
--- a/src/main/java/org/aksw/iguana/cc/metrics/impl/EachExecutionStatistic.java
+++ b/src/main/java/org/aksw/iguana/cc/metrics/impl/EachExecutionStatistic.java
@@ -11,7 +11,7 @@
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.rdf.model.ResourceFactory;
-import javax.annotation.Nonnull;
+import javax.validation.constraints.NotNull;
import java.math.BigInteger;
import java.util.List;
@@ -22,7 +22,7 @@ public EachExecutionStatistic() {
}
@Override
- @Nonnull
+ @NotNull
public Model createMetricModel(List workers, List[][] data, IRES.Factory iresFactory) {
Model m = ModelFactory.createDefaultModel();
for (var worker : workers) {
diff --git a/src/test/java/org/aksw/iguana/commons/io/BigByteArrayInputStreamTest.java b/src/test/java/org/aksw/iguana/commons/io/BigByteArrayInputStreamTest.java
index 4b9a9e86b..fbb003335 100644
--- a/src/test/java/org/aksw/iguana/commons/io/BigByteArrayInputStreamTest.java
+++ b/src/test/java/org/aksw/iguana/commons/io/BigByteArrayInputStreamTest.java
@@ -14,7 +14,6 @@
import static org.junit.jupiter.api.Assertions.*;
-@Disabled("Big test")
class BigByteArrayInputStreamTest {
private static final int MAX_SINGLE_BUFFER_SIZE = Integer.MAX_VALUE - 8;
diff --git a/src/test/java/org/aksw/iguana/commons/io/BigByteArrayOutputStreamTest.java b/src/test/java/org/aksw/iguana/commons/io/BigByteArrayOutputStreamTest.java
index 82c1addcb..90281eda0 100644
--- a/src/test/java/org/aksw/iguana/commons/io/BigByteArrayOutputStreamTest.java
+++ b/src/test/java/org/aksw/iguana/commons/io/BigByteArrayOutputStreamTest.java
@@ -18,7 +18,6 @@
import static org.junit.jupiter.api.Assertions.*;
-@Disabled("Big test")
class BigByteArrayOutputStreamTest {
final static Random rng = new Random(0);