Skip to content

Commit 1a7f23a

Browse files
authored
Refactoring (#1476)
1 parent eeadd97 commit 1a7f23a

File tree

146 files changed

+266
-520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+266
-520
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ If you want to contribute a pull request, we have a little bit of process you'll
4747
- Take a moment to read and sign our [CLA](http://neo4j.com/developer/cla)
4848

4949
We can't guarantee that we'll accept pull requests and may ask you to make some changes before they go in.
50-
Occasionally, we might also have logistical, commercial, or legal reasons why we can't accept your work but we'll try to find an alternative way for you to contribute in that case.
50+
Occasionally, we might also have logistical, commercial, or legal reasons why we can't accept your work, but we'll try to find an alternative way for you to contribute in that case.
5151
Remember that many community members have become regular contributors and some are now even Neo employees!
5252

5353

ISSUE_TEMPLATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ To help us understand your issue, please specify important details, primarily:
1515

1616
- Neo4j version: Community/Enterprise X.Y.Z
1717
- Neo4j Mode: Single instance/HA cluster with X members/Casual cluster with X core Y read-replica
18-
- Driver version: X lanaguage driver X.Y.Z (If you use some other library that wraps around this driver, you might want to raise an issue there first)
18+
- Driver version: X language driver X.Y.Z (If you use some other library that wraps around this driver, you might want to raise an issue there first)
1919
- Operating system: (for example Windows 10/Ubuntu 16.10 on AWS)
2020
- **Steps to reproduce**
2121
- Expected behavior
2222
- Actual behavior
2323

2424
Additionally, include (as appropriate) log-files, stacktraces, and other debug output.
2525
Always check the server logs to see if there is any stacktrace related to the driver error too.
26-
Aslo add any solutions you've tried to solve the problem yourself.
26+
Also, add any solutions you've tried to solve the problem yourself.
2727

2828
## Example bug report
2929

@@ -35,7 +35,7 @@ I got connection reset by peer errors.
3535
**Operating System:** Ubuntu 16.10 on AWS
3636

3737
### Steps to reproduce
38-
1. Start Neo4j on a AWS instance
38+
1. Start Neo4j on an AWS instance
3939
2. Run a query with the driver
4040
3. Put the driver idle for 2h
4141
4. Run another query

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ There are 2 ways of running Testkit tests:
142142

143143
##### Using the testkit-tests module
144144

145-
The `testkit-tests` module will automatically checkout Testkit and run it during Maven build.
145+
The `testkit-tests` module will automatically check out Testkit and run it during Maven build.
146146

147147
Prerequisites:
148148
- Docker
@@ -189,7 +189,7 @@ TEST_DOCKER_RMI=true \
189189
python3 main.py --tests TESTKIT_TESTS UNIT_TESTS --configs 4.3-enterprise
190190
````
191191
192-
On Windows or in the abscence of a Bash-compatible environment, the required steps are probably different.
192+
On Windows or in the absence of a Bash-compatible environment, the required steps are probably different.
193193
A simple `mvn clean install` will require admin rights on Windows, because our integration tests require admin privileges to install and start a service.
194194
195195
If all of this fails and you only want to try out a local development version of the driver, you could skip all tests like this:

driver/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<!-- Test dependencies -->
7070
<dependency>
7171
<groupId>org.hamcrest</groupId>
72-
<artifactId>hamcrest-junit</artifactId>
72+
<artifactId>hamcrest</artifactId>
7373
</dependency>
7474
<dependency>
7575
<groupId>org.mockito</groupId>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ public ConfigBuilder withLogging(Logging logging) {
390390
*
391391
* @return this builder
392392
*/
393+
@SuppressWarnings("deprecation")
393394
public ConfigBuilder withLeakedSessionsLogging() {
394395
this.logLeakedSessions = true;
395396
return this;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ default AsyncSession asyncSession(SessionConfig sessionConfig) {
377377
*/
378378
@Experimental
379379
@Deprecated
380+
@SuppressWarnings("SameReturnValue")
380381
TypeSystem defaultTypeSystem();
381382

382383
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ static Logging console(Level level) {
143143
*
144144
* @return new logging implementation.
145145
*/
146+
@SuppressWarnings("SameReturnValue")
146147
static Logging none() {
147148
return DEV_NULL_LOGGING;
148149
}

driver/src/main/java/org/neo4j/driver/exceptions/AuthTokenManagerExecutionException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* <ul>
3030
* <li>{@link AuthTokenManager#getToken()} returned {@code null}</li>
3131
* <li>{@link AuthTokenManager#getToken()} returned a {@link java.util.concurrent.CompletionStage} that completed with {@code null}</li>
32-
* <li>{@link AuthTokenManager#getToken()} returned a {@link java.util.concurrent.CompletionStage} that completed with a token that was not creeated using {@link org.neo4j.driver.AuthTokens}</li>
32+
* <li>{@link AuthTokenManager#getToken()} returned a {@link java.util.concurrent.CompletionStage} that completed with a token that was not created using {@link org.neo4j.driver.AuthTokens}</li>
3333
* <li>{@link AuthTokenManager#getToken()} has thrown an exception</li>
3434
* <li>{@link AuthTokenManager#getToken()} returned a {@link java.util.concurrent.CompletionStage} that completed exceptionally</li>
3535
* </ul>

driver/src/main/java/org/neo4j/driver/internal/InternalPath.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public InternalPath(List<Entity> alternatingNodeAndRel) {
8989
// even index - this should be a node
9090
try {
9191
lastNode = (Node) entity;
92-
if (nodes.isEmpty() || isEndpoint(lastNode, lastRelationship)) {
92+
if (nodes.isEmpty() || (lastRelationship != null && isEndpoint(lastNode, lastRelationship))) {
9393
nodes.add(lastNode);
9494
} else {
9595
throw new IllegalArgumentException("Node argument " + index

driver/src/main/java/org/neo4j/driver/internal/async/connection/NettyDomainNameResolverGroup.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public NettyDomainNameResolverGroup(DomainNameResolver domainNameResolver) {
3232
}
3333

3434
@Override
35+
@SuppressWarnings("resource")
3536
protected AddressResolver<InetSocketAddress> newResolver(EventExecutor executor) {
3637
return new NettyDomainNameResolver(executor, domainNameResolver).asAddressResolver();
3738
}

driver/src/main/java/org/neo4j/driver/internal/cluster/RediscoveryImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ private CompletionStage<ClusterComposition> lookupOnRouter(
310310
});
311311
}
312312

313-
@SuppressWarnings("ThrowableNotThrown")
313+
@SuppressWarnings({"ThrowableNotThrown", "SameReturnValue"})
314314
private ClusterComposition handleRoutingProcedureError(
315315
Throwable error, RoutingTable routingTable, BoltServerAddress routerAddress, Throwable baseError) {
316316
if (mustAbortDiscovery(error)) {

driver/src/main/java/org/neo4j/driver/internal/logging/DevNullLogging.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public Logger getLog(String name) {
4343
// Reference: https://docs.oracle.com/en/java/javase/17/docs/specs/serialization/input.html#the-readresolve-method
4444
// andJoshua Bloch, Effective Java 3rd edition
4545
@Serial
46+
@SuppressWarnings("SameReturnValue")
4647
private Object readResolve() {
4748
return DEV_NULL_LOGGING;
4849
}

driver/src/main/java/org/neo4j/driver/internal/packstream/PackStream.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ public String unpackString() throws IOException {
516516
* @return null
517517
* @throws IOException if the unpacked value was not null
518518
*/
519+
@SuppressWarnings("SameReturnValue")
519520
public Object unpackNull() throws IOException {
520521
final var markerByte = in.readByte();
521522
if (markerByte != NULL) {

driver/src/main/java/org/neo4j/driver/internal/retry/ExponentialBackoffRetryLogic.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ private Retry exponentialBackoffRetryRx() {
186186
if (canRetryOn(error)) {
187187
var currentTime = clock.millis();
188188

189+
@SuppressWarnings("DataFlowIssue")
189190
long startTime = contextView.getOrDefault("startTime", currentTime);
191+
@SuppressWarnings("DataFlowIssue")
190192
long nextDelayMs = contextView.getOrDefault("nextDelayMs", initialRetryDelayMs);
191193

192194
var elapsedTime = currentTime - startTime;
@@ -213,6 +215,7 @@ private Retry exponentialBackoffRetryRx() {
213215
}
214216
addSuppressed(throwable, errors);
215217

218+
//noinspection DataFlowIssue
216219
return Mono.error(throwable);
217220
})));
218221
}

driver/src/main/java/org/neo4j/driver/reactivestreams/ReactiveResult.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,21 @@ public interface ReactiveResult {
5151
* Returns a cold unicast publisher of records.
5252
* <p>
5353
* When the record publisher is {@linkplain Publisher#subscribe(Subscriber) subscribed}, the query is executed and the result is streamed back as a record
54-
* stream followed by a result summary. This record publisher publishes all records in the result and signals the completion. However before completion or
54+
* stream followed by a result summary. This record publisher publishes all records in the result and signals the completion. However, before completion or
5555
* error reporting if any, a cleanup of result resources such as network connection will be carried out automatically.
5656
* <p>
57-
* Therefore the {@link Subscriber} of this record publisher shall wait for the termination signal (complete or error) to ensure that the resources used by
57+
* Therefore, the {@link Subscriber} of this record publisher shall wait for the termination signal (complete or error) to ensure that the resources used by
5858
* this result are released correctly. Then the session is ready to be used to run more queries.
5959
* <p>
6060
* Cancelling of the record streaming will immediately terminate the propagation of new records. But it will not cancel query execution on the server. When
6161
* the execution is finished, the {@link Subscriber} will be notified with a termination signal (complete or error).
6262
* <p>
63-
* The record publishing event by default runs in an Network IO thread, as a result no blocking operation is allowed in this thread. Otherwise network IO
63+
* The record publishing event by default runs in a Network IO thread, as a result no blocking operation is allowed in this thread. Otherwise, network IO
6464
* might be blocked by application logic.
6565
* <p>
6666
* This publisher can only be subscribed by one {@link Subscriber} once.
6767
* <p>
68-
* If this publisher is subscribed after {@link #keys()}, then the publish of records is carried out after the arrival of keys. If this publisher is
68+
* If this publisher is subscribed after {@link #keys()}, then the publishing of records is carried out after the arrival of keys. If this publisher is
6969
* subscribed after {@link #consume()}, then a {@link ResultConsumedException} will be thrown.
7070
*
7171
* @return a cold unicast publisher of records.

driver/src/main/java/org/neo4j/driver/reactivestreams/ReactiveSession.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public interface ReactiveSession extends BaseSession, ReactiveQueryRunner {
4444
* Begin a new <em>unmanaged {@linkplain ReactiveTransaction transaction}</em>. At most one transaction may exist in a session at any point in time. To
4545
* maintain multiple concurrent transactions, use multiple concurrent sessions.
4646
* <p>
47-
* It by default is executed in a Network IO thread, as a result no blocking operation is allowed in this thread.
47+
* It is by default is executed in a Network IO thread, as a result no blocking operation is allowed in this thread.
4848
*
4949
* @return a new {@link ReactiveTransaction}
5050
*/
@@ -56,7 +56,7 @@ default Publisher<ReactiveTransaction> beginTransaction() {
5656
* Begin a new <em>unmanaged {@linkplain ReactiveTransaction transaction}</em> with the specified {@link TransactionConfig configuration}. At most one
5757
* transaction may exist in a session at any point in time. To maintain multiple concurrent transactions, use multiple concurrent sessions.
5858
* <p>
59-
* It by default is executed in a Network IO thread, as a result no blocking operation is allowed in this thread.
59+
* It is by default is executed in a Network IO thread, as a result no blocking operation is allowed in this thread.
6060
*
6161
* @param config configuration for the new transaction.
6262
* @return a new {@link ReactiveTransaction}

driver/src/main/java/org/neo4j/driver/summary/Plan.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* This can be extremely helpful in understanding what a query is doing, and how to optimize it. For more
2929
* details, see the Neo4j Manual.
3030
* <p>
31-
* The plan for the query is a tree of plans - each sub-tree containing zero or more child plans. The query
31+
* The plan for the query is a tree of plans - each subtree containing zero or more child plans. The query
3232
* starts with the root plan. Each sub-plan is of a specific {@link #operatorType() operator type}, which describes
3333
* what that part of the plan does - for instance, perform an index lookup or filter results. The Neo4j Manual contains
3434
* a reference of the available operator types, and these may differ across Neo4j versions.

driver/src/main/java/org/neo4j/driver/summary/SummaryCounters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@Immutable
2828
public interface SummaryCounters {
2929
/**
30-
* Whether there were any updates at all, eg. any of the counters are greater than 0.
30+
* Whether there were any updates at all, e.g. any of the counters are greater than 0.
3131
* @return true if the query made any updates
3232
*/
3333
boolean containsUpdates();

driver/src/main/java/org/neo4j/driver/types/MapAccessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* Access the keys, properties and values of an underlying unordered map by key
3030
* <p>
31-
* This provides only read methods. Subclasses may chose to provide additional methods
31+
* This provides only read methods. Subclasses may choose to provide additional methods
3232
* for changing the underlying map.
3333
* @since 1.0
3434
*/
@@ -96,7 +96,7 @@ public interface MapAccessor {
9696
* as {@link Values#ofBoolean()}, {@link Values#ofList(Function)}.
9797
* @param <T> the type of map values
9898
* @see Values for a long list of built-in conversion functions
99-
* @return the value as a map from string keys to values of type T obtained from mapping he original map values, if possible
99+
* @return the value as a map from string keys to values of type T obtained from mapping the original map values, if possible
100100
*/
101101
<T> Map<String, T> asMap(Function<Value, T> mapFunction);
102102
}

driver/src/main/java/org/neo4j/driver/types/MapAccessorWithDefaultValue.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.neo4j.driver.Value;
2525

2626
/**
27-
* Provides methods to access the value of an underlying unordered map by key. When calling the methods, a user need to provides a default value, which will be
27+
* Provides methods to access the value of an underlying unordered map by key. When calling the methods, a user need to provide a default value, which will be
2828
* given back if no match found by the key provided. The default value also servers the purpose of specifying the return type of the value found in map by key.
2929
* If the type of the value found A differs from the type of the default value B, a cast from A to B would happen automatically. Note: Error might arise if the
3030
* cast from A to B is not possible.

driver/src/main/java/org/neo4j/driver/types/Point.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@ public interface Point {
5555
*
5656
* @return the {@code z} coordinate value or {@link Double#NaN} if not applicable.
5757
*/
58+
@SuppressWarnings("SameReturnValue")
5859
double z();
5960
}

driver/src/main/java/org/neo4j/driver/types/Relationship.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
public interface Relationship extends Entity {
2626
/**
27-
* Id of the node where this relationship starts.
27+
* The id of the node where this relationship starts.
2828
* <p>
2929
* Please note that depending on server configuration numeric id might not be available and accessing it will result in {@link IllegalStateException}.
3030
*
@@ -36,14 +36,14 @@ public interface Relationship extends Entity {
3636
long startNodeId();
3737

3838
/**
39-
* Id of the node where this relationship starts.
39+
* The id of the node where this relationship starts.
4040
*
4141
* @return the node id
4242
*/
4343
String startNodeElementId();
4444

4545
/**
46-
* Id of the node where this relationship ends.
46+
* The id of the node where this relationship ends.
4747
* <p>
4848
* Please note that depending on server configuration numeric id might not be available and accessing it will result in {@link IllegalStateException}.
4949
*
@@ -55,7 +55,7 @@ public interface Relationship extends Entity {
5555
long endNodeId();
5656

5757
/**
58-
* Id of the node where this relationship ends.
58+
* The id of the node where this relationship ends.
5959
*
6060
* @return the node id
6161
*/

driver/src/main/java/org/neo4j/driver/types/Type.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.neo4j.driver.util.Immutable;
2323

2424
/**
25-
* The type of a {@link Value} as defined by the Cypher language
25+
* The type of {@link Value} as defined by the Cypher language
2626
* @since 1.0
2727
*/
2828
@Immutable

driver/src/main/java/org/neo4j/driver/types/TypeSystem.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public interface TypeSystem {
3333
*
3434
* @return instance of type system
3535
*/
36+
@SuppressWarnings("SameReturnValue")
3637
static TypeSystem getDefault() {
3738
return TYPE_SYSTEM;
3839
}

driver/src/test/java/org/neo4j/driver/AuthTokensTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
package org.neo4j.driver;
2020

2121
import static java.util.Arrays.asList;
22+
import static org.hamcrest.MatcherAssert.assertThat;
2223
import static org.hamcrest.core.IsEqual.equalTo;
23-
import static org.hamcrest.junit.MatcherAssert.assertThat;
2424
import static org.junit.jupiter.api.Assertions.assertEquals;
2525
import static org.junit.jupiter.api.Assertions.assertThrows;
2626
import static org.neo4j.driver.AuthTokens.basic;

driver/src/test/java/org/neo4j/driver/GraphDatabaseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
package org.neo4j.driver;
2020

2121
import static java.util.concurrent.TimeUnit.MILLISECONDS;
22+
import static org.hamcrest.MatcherAssert.assertThat;
2223
import static org.hamcrest.Matchers.containsString;
23-
import static org.hamcrest.junit.MatcherAssert.assertThat;
2424
import static org.junit.jupiter.api.Assertions.assertEquals;
2525
import static org.junit.jupiter.api.Assertions.assertNotNull;
2626
import static org.junit.jupiter.api.Assertions.assertThrows;

driver/src/test/java/org/neo4j/driver/ParametersTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
import static java.util.Collections.singletonList;
2222
import static java.util.Collections.singletonMap;
23+
import static org.hamcrest.MatcherAssert.assertThat;
2324
import static org.hamcrest.Matchers.startsWith;
24-
import static org.hamcrest.junit.MatcherAssert.assertThat;
2525
import static org.junit.jupiter.api.Assertions.assertEquals;
2626
import static org.junit.jupiter.api.Assertions.assertThrows;
2727
import static org.junit.jupiter.api.Assumptions.assumeTrue;

driver/src/test/java/org/neo4j/driver/QueryConfigTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ void shouldUpdateRouting(RoutingControl routing) {
5656
}
5757

5858
@Test
59+
@SuppressWarnings("WriteOnlyObject")
5960
void shouldNotAllowNullRouting() {
6061
assertThrows(NullPointerException.class, () -> QueryConfig.builder().withRouting(null));
6162
}

driver/src/test/java/org/neo4j/driver/QueryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
*/
1919
package org.neo4j.driver;
2020

21+
import static org.hamcrest.MatcherAssert.assertThat;
2122
import static org.hamcrest.Matchers.equalTo;
22-
import static org.hamcrest.junit.MatcherAssert.assertThat;
2323
import static org.junit.jupiter.api.Assertions.assertThrows;
2424
import static org.neo4j.driver.Values.parameters;
2525

driver/src/test/java/org/neo4j/driver/integration/ChannelConnectorImplIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
package org.neo4j.driver.integration;
2020

2121
import static java.util.concurrent.CompletableFuture.runAsync;
22+
import static org.hamcrest.MatcherAssert.assertThat;
2223
import static org.hamcrest.Matchers.instanceOf;
2324
import static org.hamcrest.Matchers.startsWith;
24-
import static org.hamcrest.junit.MatcherAssert.assertThat;
2525
import static org.junit.jupiter.api.Assertions.assertEquals;
2626
import static org.junit.jupiter.api.Assertions.assertFalse;
2727
import static org.junit.jupiter.api.Assertions.assertNotNull;

driver/src/test/java/org/neo4j/driver/integration/ConnectionPoolIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
package org.neo4j.driver.integration;
2020

2121
import static java.util.concurrent.TimeUnit.SECONDS;
22+
import static org.hamcrest.MatcherAssert.assertThat;
2223
import static org.hamcrest.Matchers.is;
23-
import static org.hamcrest.junit.MatcherAssert.assertThat;
2424
import static org.junit.jupiter.api.Assertions.assertEquals;
2525
import static org.junit.jupiter.api.Assertions.assertFalse;
2626
import static org.junit.jupiter.api.Assertions.assertThrows;

driver/src/test/java/org/neo4j/driver/integration/CredentialsIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
package org.neo4j.driver.integration;
2020

2121
import static java.util.Collections.singletonMap;
22+
import static org.hamcrest.MatcherAssert.assertThat;
2223
import static org.hamcrest.Matchers.containsString;
2324
import static org.hamcrest.Matchers.equalTo;
24-
import static org.hamcrest.junit.MatcherAssert.assertThat;
2525
import static org.junit.jupiter.api.Assertions.assertThrows;
2626
import static org.neo4j.driver.AuthTokens.basic;
2727
import static org.neo4j.driver.AuthTokens.custom;

driver/src/test/java/org/neo4j/driver/integration/DirectDriverIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
*/
1919
package org.neo4j.driver.integration;
2020

21+
import static org.hamcrest.MatcherAssert.assertThat;
2122
import static org.hamcrest.Matchers.is;
2223
import static org.hamcrest.core.IsEqual.equalTo;
23-
import static org.hamcrest.junit.MatcherAssert.assertThat;
2424
import static org.junit.jupiter.api.Assertions.assertThrows;
2525
import static org.neo4j.driver.internal.util.Matchers.directDriverWithAddress;
2626

0 commit comments

Comments
 (0)