From cf1dc6dae18af3989e99f8a506423270f9320345 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 17 May 2023 18:43:23 +0100 Subject: [PATCH] Upgrade to Spring Framework 5.3.27 Closes gh-35497 --- .../jdbc/HikariDriverConfigurationFailureAnalyzer.java | 8 ++++---- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/HikariDriverConfigurationFailureAnalyzer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/HikariDriverConfigurationFailureAnalyzer.java index 30d4d4aa58..9e04c28871 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/HikariDriverConfigurationFailureAnalyzer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/HikariDriverConfigurationFailureAnalyzer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2023 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. @@ -28,12 +28,12 @@ import org.springframework.jdbc.CannotGetJdbcConnectionException; */ class HikariDriverConfigurationFailureAnalyzer extends AbstractFailureAnalyzer { - private static final String EXPECTED_MESSAGE = "Failed to obtain JDBC Connection:" - + " cannot use driverClassName and dataSourceClassName together."; + private static final String EXPECTED_MESSAGE = "cannot use driverClassName and dataSourceClassName together."; @Override protected FailureAnalysis analyze(Throwable rootFailure, CannotGetJdbcConnectionException cause) { - if (!EXPECTED_MESSAGE.equals(cause.getMessage())) { + Throwable subCause = cause.getCause(); + if (subCause == null || !EXPECTED_MESSAGE.equals(subCause.getMessage())) { return null; } return new FailureAnalysis( diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index ef1e90c7ac..c3dd406c49 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1716,7 +1716,7 @@ bom { ] } } - library("Spring Framework", "5.3.20") { + library("Spring Framework", "5.3.27") { group("org.springframework") { imports = [ "spring-framework-bom"