Skip to content

Commit

Permalink
Change NotNull annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
nck-mlcnv committed Nov 6, 2023
1 parent 9e0b732 commit 90c0660
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@
<artifactId>spring-context</artifactId>
<version>6.0.11</version>
</dependency>

<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
</dependencies>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<HttpWorker> workers, List<HttpWorker.ExecutionStats>[][] data, IRES.Factory iresFactory) {
default @NotNull Model createMetricModel(List<HttpWorker> workers, List<HttpWorker.ExecutionStats>[][] data, IRES.Factory iresFactory) {
return ModelFactory.createDefaultModel();
}

default @Nonnull Model createMetricModel(List<HttpWorker> workers, Map<String, List<HttpWorker.ExecutionStats>> data, IRES.Factory iresFactory) {
default @NotNull Model createMetricModel(List<HttpWorker> workers, Map<String, List<HttpWorker.ExecutionStats>> data, IRES.Factory iresFactory) {
return ModelFactory.createDefaultModel();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,7 +28,7 @@ public AggregatedExecutionStatistics() {
}

@Override
@Nonnull
@NotNull
public Model createMetricModel(List<HttpWorker> workers, List<HttpWorker.ExecutionStats>[][] data, IRES.Factory iresFactory) {
Model m = ModelFactory.createDefaultModel();
for (var worker : workers) {
Expand All @@ -41,7 +41,7 @@ public Model createMetricModel(List<HttpWorker> workers, List<HttpWorker.Executi
}

@Override
@Nonnull
@NotNull
public Model createMetricModel(List<HttpWorker> workers, Map<String, List<HttpWorker.ExecutionStats>> data, IRES.Factory iresFactory) {
Model m = ModelFactory.createDefaultModel();
for (String queryID : data.keySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -22,7 +22,7 @@ public EachExecutionStatistic() {
}

@Override
@Nonnull
@NotNull
public Model createMetricModel(List<HttpWorker> workers, List<HttpWorker.ExecutionStats>[][] data, IRES.Factory iresFactory) {
Model m = ModelFactory.createDefaultModel();
for (var worker : workers) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static org.junit.jupiter.api.Assertions.*;

@Disabled("Big test")
class BigByteArrayOutputStreamTest {
final static Random rng = new Random(0);

Expand Down

0 comments on commit 90c0660

Please sign in to comment.