diff --git a/testkit-backend/pom.xml b/testkit-backend/pom.xml
index 20d42658ed..d7fb8f9ae2 100644
--- a/testkit-backend/pom.xml
+++ b/testkit-backend/pom.xml
@@ -61,7 +61,10 @@
org.apache.maven.plugins
maven-compiler-plugin
-
+
+ -Xlint:all,-processing
+ -Werror
+
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/CustomDriverError.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/CustomDriverError.java
index 652d66fd4b..17cb576f33 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/CustomDriverError.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/CustomDriverError.java
@@ -18,7 +18,12 @@
*/
package neo4j.org.testkit.backend;
+import java.io.Serial;
+
public class CustomDriverError extends RuntimeException {
+ @Serial
+ private static final long serialVersionUID = 2979071989786663535L;
+
public CustomDriverError(Throwable cause) {
super(cause);
}
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/FrontendError.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/FrontendError.java
index bf8b1b9594..63ca3c2bc9 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/FrontendError.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/FrontendError.java
@@ -18,4 +18,9 @@
*/
package neo4j.org.testkit.backend;
-public class FrontendError extends RuntimeException {}
+import java.io.Serial;
+
+public class FrontendError extends RuntimeException {
+ @Serial
+ private static final long serialVersionUID = -8369933385092563391L;
+}
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/holder/RxResultHolder.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/holder/RxResultHolder.java
index 1fe61d249e..db7e34e7bf 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/holder/RxResultHolder.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/holder/RxResultHolder.java
@@ -26,6 +26,7 @@
import org.neo4j.driver.Record;
import org.neo4j.driver.reactive.RxResult;
+@SuppressWarnings("deprecation")
public class RxResultHolder extends AbstractResultHolder {
@Setter
private RxBufferedSubscriber subscriber;
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/holder/RxSessionHolder.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/holder/RxSessionHolder.java
index 2156a153dc..ad64081d58 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/holder/RxSessionHolder.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/holder/RxSessionHolder.java
@@ -21,6 +21,7 @@
import org.neo4j.driver.SessionConfig;
import org.neo4j.driver.reactive.RxSession;
+@SuppressWarnings("deprecation")
public class RxSessionHolder extends AbstractSessionHolder {
public RxSessionHolder(DriverHolder driverHolder, RxSession session, SessionConfig config) {
super(driverHolder, session, config);
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/holder/RxTransactionHolder.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/holder/RxTransactionHolder.java
index fe36e926d4..d2e55397da 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/holder/RxTransactionHolder.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/holder/RxTransactionHolder.java
@@ -20,6 +20,7 @@
import org.neo4j.driver.reactive.RxTransaction;
+@SuppressWarnings("deprecation")
public class RxTransactionHolder extends AbstractTransactionHolder {
public RxTransactionHolder(RxSessionHolder sessionHolder, RxTransaction transaction) {
super(sessionHolder, transaction);
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/TestkitModule.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/TestkitModule.java
index 26b1880ba5..c31f72774e 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/TestkitModule.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/TestkitModule.java
@@ -19,6 +19,7 @@
package neo4j.org.testkit.backend.messages;
import com.fasterxml.jackson.databind.module.SimpleModule;
+import java.io.Serial;
import java.time.LocalDate;
import java.util.List;
import neo4j.org.testkit.backend.messages.requests.deserializer.TestkitCypherDateDeserializer;
@@ -57,6 +58,9 @@
import org.neo4j.driver.types.IsoDuration;
public class TestkitModule extends SimpleModule {
+ @Serial
+ private static final long serialVersionUID = 7051732358423895087L;
+
public TestkitModule() {
this.addDeserializer(List.class, new TestkitListDeserializer());
this.addDeserializer(CypherDateTime.class, new TestkitCypherDateTimeDeserializer());
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/NewSession.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/NewSession.java
index 8078c1b033..1c25738381 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/NewSession.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/NewSession.java
@@ -105,6 +105,7 @@ private AsyncSessionHolder createAsyncSessionState(DriverHolder driverHolder, Se
driverHolder, driverHolder.getDriver().asyncSession(sessionConfig), sessionConfig);
}
+ @SuppressWarnings("deprecation")
private RxSessionHolder createRxSessionState(DriverHolder driverHolder, SessionConfig sessionConfig) {
return new RxSessionHolder(driverHolder, driverHolder.getDriver().rxSession(sessionConfig), sessionConfig);
}
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionBeginTransaction.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionBeginTransaction.java
index 264797edd7..608a273814 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionBeginTransaction.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionBeginTransaction.java
@@ -88,6 +88,7 @@ public CompletionStage processAsync(TestkitState testkitState)
}
@Override
+ @SuppressWarnings("deprecation")
public Mono processRx(TestkitState testkitState) {
return testkitState.getRxSessionHolder(data.getSessionId()).flatMap(sessionHolder -> {
RxSession session = sessionHolder.getSession();
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionLastBookmarks.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionLastBookmarks.java
index 50e42c8d81..e1a5d8ecca 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionLastBookmarks.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionLastBookmarks.java
@@ -50,6 +50,7 @@ public CompletionStage processAsync(TestkitState testkitState)
}
@Override
+ @SuppressWarnings("deprecation")
public Mono processRx(TestkitState testkitState) {
return testkitState
.getRxSessionHolder(data.getSessionId())
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionReadTransaction.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionReadTransaction.java
index 0203edf84a..13a00fd509 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionReadTransaction.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionReadTransaction.java
@@ -48,6 +48,7 @@ public class SessionReadTransaction implements TestkitRequest {
private SessionReadTransactionBody data;
@Override
+ @SuppressWarnings("deprecation")
public TestkitResponse process(TestkitState testkitState) {
SessionHolder sessionHolder = testkitState.getSessionHolder(data.getSessionId());
Session session = sessionHolder.getSession();
@@ -56,6 +57,7 @@ public TestkitResponse process(TestkitState testkitState) {
}
@Override
+ @SuppressWarnings("deprecation")
public CompletionStage processAsync(TestkitState testkitState) {
return testkitState
.getAsyncSessionHolder(data.getSessionId())
@@ -77,6 +79,7 @@ public CompletionStage processAsync(TestkitState testkitState)
}
@Override
+ @SuppressWarnings("deprecation")
public Mono processRx(TestkitState testkitState) {
return testkitState
.getRxSessionHolder(data.getSessionId())
@@ -113,6 +116,7 @@ public Mono processReactive(TestkitState testkitState) {
.then(Mono.just(retryableDone()));
}
+ @SuppressWarnings("deprecation")
private TransactionWork handle(TestkitState testkitState, SessionHolder sessionHolder) {
return tx -> {
String txId = testkitState.addTransactionHolder(new TransactionHolder(sessionHolder, tx));
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionRun.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionRun.java
index 88857ed1ba..8624fd3e39 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionRun.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionRun.java
@@ -99,6 +99,7 @@ public CompletionStage processAsync(TestkitState testkitState)
}
@Override
+ @SuppressWarnings("deprecation")
public Mono processRx(TestkitState testkitState) {
return testkitState.getRxSessionHolder(data.getSessionId()).flatMap(sessionHolder -> {
RxSession session = sessionHolder.getSession();
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionWriteTransaction.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionWriteTransaction.java
index 50803689fc..6effd93b95 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionWriteTransaction.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionWriteTransaction.java
@@ -49,6 +49,7 @@ public class SessionWriteTransaction implements TestkitRequest {
private SessionWriteTransactionBody data;
@Override
+ @SuppressWarnings("deprecation")
public TestkitResponse process(TestkitState testkitState) {
SessionHolder sessionHolder = testkitState.getSessionHolder(data.getSessionId());
Session session = sessionHolder.getSession();
@@ -57,6 +58,7 @@ public TestkitResponse process(TestkitState testkitState) {
}
@Override
+ @SuppressWarnings("deprecation")
public CompletionStage processAsync(TestkitState testkitState) {
return testkitState
.getAsyncSessionHolder(data.getSessionId())
@@ -78,6 +80,7 @@ public CompletionStage processAsync(TestkitState testkitState)
}
@Override
+ @SuppressWarnings("deprecation")
public Mono processRx(TestkitState testkitState) {
return testkitState
.getRxSessionHolder(data.getSessionId())
@@ -114,6 +117,7 @@ public Mono processReactive(TestkitState testkitState) {
.then(Mono.just(retryableDone()));
}
+ @SuppressWarnings("deprecation")
private TransactionWork handle(TestkitState testkitState, SessionHolder sessionHolder) {
return tx -> {
String txId = testkitState.addTransactionHolder(new TransactionHolder(sessionHolder, tx));
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/TransactionClose.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/TransactionClose.java
index 7432944971..8a75db4f10 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/TransactionClose.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/TransactionClose.java
@@ -49,6 +49,7 @@ public CompletionStage processAsync(TestkitState testkitState)
}
@Override
+ @SuppressWarnings("deprecation")
public Mono processRx(TestkitState testkitState) {
return testkitState
.getRxTransactionHolder(data.getTxId())
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/TransactionRun.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/TransactionRun.java
index 9617d8af5e..b7d07c4fb7 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/TransactionRun.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/TransactionRun.java
@@ -66,6 +66,7 @@ public CompletionStage processAsync(TestkitState testkitState)
}
@Override
+ @SuppressWarnings("deprecation")
public Mono processRx(TestkitState testkitState) {
return testkitState.getRxTransactionHolder(data.getTxId()).flatMap(transactionHolder -> {
RxResult result = transactionHolder
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherDateDeserializer.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherDateDeserializer.java
index 7d4247f7ef..c4a37329e8 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherDateDeserializer.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherDateDeserializer.java
@@ -23,11 +23,15 @@
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import java.io.IOException;
+import java.io.Serial;
import java.time.LocalDate;
import java.util.Date;
public class TestkitCypherDateDeserializer extends StdDeserializer {
+ @Serial
+ private static final long serialVersionUID = 3489940766207129614L;
+
private final TestkitCypherTypeMapper mapper;
public TestkitCypherDateDeserializer() {
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherDateTimeDeserializer.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherDateTimeDeserializer.java
index 97e59e7210..936592ad90 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherDateTimeDeserializer.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherDateTimeDeserializer.java
@@ -23,9 +23,13 @@
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import java.io.IOException;
+import java.io.Serial;
import neo4j.org.testkit.backend.messages.requests.deserializer.types.CypherDateTime;
public class TestkitCypherDateTimeDeserializer extends StdDeserializer {
+ @Serial
+ private static final long serialVersionUID = 8980981682742682436L;
+
private final TestkitCypherTypeMapper mapper;
public TestkitCypherDateTimeDeserializer() {
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherDurationDeserializer.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherDurationDeserializer.java
index b1d7fb49bf..30d9fe32bf 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherDurationDeserializer.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherDurationDeserializer.java
@@ -23,10 +23,14 @@
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import java.io.IOException;
+import java.io.Serial;
import org.neo4j.driver.internal.InternalIsoDuration;
import org.neo4j.driver.types.IsoDuration;
public class TestkitCypherDurationDeserializer extends StdDeserializer {
+ @Serial
+ private static final long serialVersionUID = 3128342779161014747L;
+
private final TestkitCypherTypeMapper mapper;
public TestkitCypherDurationDeserializer() {
diff --git a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherParamDeserializer.java b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherParamDeserializer.java
index b5740d0db0..92e2d9eb49 100644
--- a/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherParamDeserializer.java
+++ b/testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/deserializer/TestkitCypherParamDeserializer.java
@@ -26,12 +26,16 @@
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import java.io.IOException;
+import java.io.Serial;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import neo4j.org.testkit.backend.messages.requests.deserializer.types.CypherType;
public class TestkitCypherParamDeserializer extends StdDeserializer