From c16ef0a006adfcc512d126549b681da22e1cecb7 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 12 Jul 2021 07:54:15 +0200 Subject: [PATCH] Upgrade to Neo4j Java Driver 4.3.3 Closes gh-27278 --- .../boot/actuate/neo4j/Neo4jHealthDetailsHandler.java | 3 ++- .../boot/actuate/neo4j/ResultSummaryMock.java | 3 ++- .../boot/autoconfigure/neo4j/Neo4jSpringJclLogging.java | 9 ++++++++- .../spring-boot-dependencies/build.gradle | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/neo4j/Neo4jHealthDetailsHandler.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/neo4j/Neo4jHealthDetailsHandler.java index 5bf908a3cb..c5a741d350 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/neo4j/Neo4jHealthDetailsHandler.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/neo4j/Neo4jHealthDetailsHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +36,7 @@ class Neo4jHealthDetailsHandler { * @param edition the edition of the server * @param resultSummary server information */ + @SuppressWarnings("deprecation") void addHealthDetails(Builder builder, String edition, ResultSummary resultSummary) { ServerInfo serverInfo = resultSummary.server(); builder.up().withDetail("server", serverInfo.version() + "@" + serverInfo.address()).withDetail("edition", diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/ResultSummaryMock.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/ResultSummaryMock.java index 4bbd715a0e..678b536352 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/ResultSummaryMock.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/ResultSummaryMock.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,7 @@ final class ResultSummaryMock { private ResultSummaryMock() { } + @SuppressWarnings("deprecation") static ResultSummary createResultSummary(String serverVersion, String serverAddress, String databaseName) { ServerInfo serverInfo = mock(ServerInfo.class); given(serverInfo.version()).willReturn(serverVersion); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/neo4j/Neo4jSpringJclLogging.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/neo4j/Neo4jSpringJclLogging.java index 19fa363f52..c1a5337074 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/neo4j/Neo4jSpringJclLogging.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/neo4j/Neo4jSpringJclLogging.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,6 +80,13 @@ class Neo4jSpringJclLogging implements Logging { } } + @Override + public void debug(String message, Throwable throwable) { + if (isDebugEnabled()) { + this.delegate.debug(message, throwable); + } + } + @Override public void trace(String format, Object... params) { if (isTraceEnabled()) { diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 01dc870fd2..0e791f0b3c 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1269,7 +1269,7 @@ bom { ] } } - library("Neo4j Java Driver", "4.2.6") { + library("Neo4j Java Driver", "4.3.3") { group("org.neo4j.driver") { modules = [ "neo4j-java-driver"