Skip to content

Commit 6114af3

Browse files
authored
build: build on Java 21 (#1645)
The target version is 17.
1 parent 8d5d601 commit 6114af3

37 files changed

+422
-115
lines changed

benchkit-backend/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<artifactId>neo4j-java-driver-parent</artifactId>
99
<groupId>org.neo4j.driver</groupId>
10-
<version>5.28-SNAPSHOT</version>
10+
<version>6.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>benchkit-backend</artifactId>

bundle/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.neo4j.driver</groupId>
88
<artifactId>neo4j-java-driver-parent</artifactId>
9-
<version>5.28-SNAPSHOT</version>
9+
<version>6.0-SNAPSHOT</version>
1010
<relativePath>..</relativePath>
1111
</parent>
1212

driver/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.neo4j.driver</groupId>
88
<artifactId>neo4j-java-driver-parent</artifactId>
9-
<version>5.28-SNAPSHOT</version>
9+
<version>6.0-SNAPSHOT</version>
1010
</parent>
1111

1212
<artifactId>neo4j-java-driver</artifactId>

driver/src/main/java/org/neo4j/driver/BookmarkManagerConfig.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ public BookmarkManagerConfigBuilder withInitialBookmarks(Set<Bookmark> initialBo
9999
* Provide bookmarks consumer.
100100
* <p>
101101
* The consumer will be called outside bookmark manager's synchronisation lock.
102+
* <p>
103+
* If serialization of {@link BookmarkManager} is required, the instance supplied MUST implement {@link java.io.Serializable}.
102104
*
103105
* @param bookmarksConsumer bookmarks consumer
104106
* @return this builder
@@ -115,6 +117,8 @@ public BookmarkManagerConfigBuilder withBookmarksConsumer(Consumer<Set<Bookmark>
115117
* by the bookmark manager.
116118
* <p>
117119
* The supplier will be called outside bookmark manager's synchronisation lock.
120+
* <p>
121+
* If serialization of {@link BookmarkManager} is required, the instance supplied MUST implement {@link java.io.Serializable}.
118122
*
119123
* @param bookmarksSupplier the bookmarks supplier
120124
* @return this builder

driver/src/main/java/org/neo4j/driver/Config.java

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ public long maxConnectionLifetimeMillis() {
221221
}
222222

223223
/**
224-
* @return the configured connection timeout value in milliseconds.
224+
* Returns the configured connection timeout value in milliseconds.
225+
*
226+
* @return the configured connection timeout value in milliseconds
225227
*/
226228
public int connectionTimeoutMillis() {
227229
return connectionTimeoutMillis;
@@ -246,14 +248,18 @@ public long connectionAcquisitionTimeoutMillis() {
246248
}
247249

248250
/**
249-
* @return indicator for encrypted communication.
251+
* Returns indicator for encrypted communication.
252+
*
253+
* @return indicator for encrypted communication
250254
*/
251255
public boolean encrypted() {
252256
return securitySettings.encrypted();
253257
}
254258

255259
/**
256-
* @return the strategy to use to determine the authenticity of an encryption certificate provided by the Neo4j instance we are connecting to.
260+
* Returns the strategy to use to determine the authenticity of an encryption certificate provided by the Neo4j instance we are connecting to.
261+
*
262+
* @return the strategy to use to determine the authenticity of an encryption certificate provided by the Neo4j instance we are connecting to
257263
*/
258264
public TrustStrategy trustStrategy() {
259265
return securitySettings.trustStrategy();
@@ -278,7 +284,9 @@ public static ConfigBuilder builder() {
278284
}
279285

280286
/**
281-
* @return A config with all default settings
287+
* Returns the config with all default settings.
288+
*
289+
* @return the config with all default settings
282290
*/
283291
public static Config defaultConfig() {
284292
return EMPTY;
@@ -358,7 +366,9 @@ public int eventLoopThreads() {
358366
}
359367

360368
/**
361-
* @return if the metrics is enabled or not on this driver.
369+
* Returns whether the metrics is enabled or not on this driver.
370+
*
371+
* @return if the metrics is enabled or not on this driver
362372
*/
363373
public boolean isMetricsEnabled() {
364374
return this.metricsAdapter != MetricsAdapter.DEV_NULL;
@@ -374,6 +384,8 @@ public MetricsAdapter metricsAdapter() {
374384
}
375385

376386
/**
387+
* Returns the user_agent configured for this driver.
388+
*
377389
* @return the user_agent configured for this driver
378390
*/
379391
public String userAgent() {
@@ -915,6 +927,7 @@ public enum Strategy {
915927
/**
916928
* The configured certificate files.
917929
*/
930+
@SuppressWarnings("serial")
918931
private final List<File> certFiles;
919932
/**
920933
* The flag indicating if hostname verification is enabled for this trust strategy.

driver/src/main/java/org/neo4j/driver/Logging.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import static org.neo4j.driver.internal.logging.DevNullLogging.DEV_NULL_LOGGING;
2020

21+
import java.io.Serializable;
2122
import java.util.logging.ConsoleHandler;
2223
import java.util.logging.Level;
2324
import org.neo4j.driver.internal.logging.ConsoleLogging;
@@ -82,7 +83,7 @@
8283
* @see Logger
8384
* @see Config.ConfigBuilder#withLogging(Logging)
8485
*/
85-
public interface Logging {
86+
public interface Logging extends Serializable {
8687
/**
8788
* Obtain a {@link Logger} instance by class, its name will be the fully qualified name of the class.
8889
*

driver/src/main/java/org/neo4j/driver/Query.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,26 @@ public Query(String text) {
7878
}
7979

8080
/**
81+
* Returns the query text.
82+
*
8183
* @return the query text
8284
*/
8385
public String text() {
8486
return text;
8587
}
8688

8789
/**
90+
* Returns the parameter map.
91+
*
8892
* @return the parameter map
8993
*/
9094
public Value parameters() {
9195
return parameters;
9296
}
9397

9498
/**
99+
* Returns a new Query object with updated text.
100+
*
95101
* @param newText the new query text
96102
* @return a new Query object with updated text
97103
*/
@@ -100,6 +106,8 @@ public Query withText(String newText) {
100106
}
101107

102108
/**
109+
* Returns a new Query object with updated parameters.
110+
*
103111
* @param newParameters the new parameter map
104112
* @return a new Query object with updated parameters
105113
*/
@@ -108,6 +116,8 @@ public Query withParameters(Value newParameters) {
108116
}
109117

110118
/**
119+
* Returns a new Query object with updated parameters.
120+
*
111121
* @param newParameters the new parameter map
112122
* @return a new Query object with updated parameters
113123
*/

driver/src/main/java/org/neo4j/driver/QueryConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public final class QueryConfig implements Serializable {
6767
* The transaction metadata.
6868
* @since 5.16
6969
*/
70+
@SuppressWarnings("serial")
7071
private final Map<String, Serializable> metadata;
7172

7273
/**

driver/src/main/java/org/neo4j/driver/SessionConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public final class SessionConfig implements Serializable {
4545
/**
4646
* The initial bookmarks.
4747
*/
48+
@SuppressWarnings("serial")
4849
private final Iterable<Bookmark> bookmarks;
4950
/**
5051
* The default type of access.

driver/src/main/java/org/neo4j/driver/TransactionConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public final class TransactionConfig implements Serializable {
7272
/**
7373
* The transaction metadata.
7474
*/
75+
@SuppressWarnings("serial")
7576
private final Map<String, Object> metadata;
7677

7778
// Values are not serializable, hence, we keep a transient volatile map of them around

0 commit comments

Comments
 (0)