From 472d7f3c9f3a380834d118163a13b6102a06fc91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Wed, 8 Jan 2025 11:32:48 +0100 Subject: [PATCH] Polish --- .../boot/jdbc/DataSourceBuilderRuntimeHints.java | 10 +++++----- .../boot/jdbc/DataSourceBuilderRuntimeHintsTests.java | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilderRuntimeHints.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilderRuntimeHints.java index ae306c730322..f56f064f1d97 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilderRuntimeHints.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilderRuntimeHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -38,15 +38,15 @@ class DataSourceBuilderRuntimeHints implements RuntimeHintsRegistrar { static { List typeNames = new ArrayList<>(); typeNames.add("com.mchange.v2.c3p0.ComboPooledDataSource"); - typeNames.add("org.h2.jdbcx.JdbcDataSource"); typeNames.add("com.zaxxer.hikari.HikariDataSource"); - typeNames.add("org.apache.commons.dbcp2.BasicDataSource"); typeNames.add("oracle.jdbc.datasource.OracleDataSource"); typeNames.add("oracle.ucp.jdbc.PoolDataSource"); - typeNames.add("org.vibur.dbcp.ViburDBCPDataSource"); + typeNames.add("org.apache.commons.dbcp2.BasicDataSource"); + typeNames.add("org.apache.tomcat.jdbc.pool.DataSource"); + typeNames.add("org.h2.jdbcx.JdbcDataSource"); typeNames.add("org.postgresql.ds.PGSimpleDataSource"); typeNames.add("org.springframework.jdbc.datasource.SimpleDriverDataSource"); - typeNames.add("org.apache.tomcat.jdbc.pool.DataSource"); + typeNames.add("org.vibur.dbcp.ViburDBCPDataSource"); TYPE_NAMES = Collections.unmodifiableList(typeNames); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DataSourceBuilderRuntimeHintsTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DataSourceBuilderRuntimeHintsTests.java index df82f638b76e..e7f97a79bce9 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DataSourceBuilderRuntimeHintsTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DataSourceBuilderRuntimeHintsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -39,12 +39,12 @@ class DataSourceBuilderRuntimeHintsTests { void shouldRegisterDataSourceConstructors() { ReflectionHints hints = registerHints(); Stream - .of(com.mchange.v2.c3p0.ComboPooledDataSource.class, org.h2.jdbcx.JdbcDataSource.class, - com.zaxxer.hikari.HikariDataSource.class, org.apache.commons.dbcp2.BasicDataSource.class, + .of(com.mchange.v2.c3p0.ComboPooledDataSource.class, com.zaxxer.hikari.HikariDataSource.class, oracle.jdbc.datasource.OracleDataSource.class, oracle.ucp.jdbc.PoolDataSource.class, - org.vibur.dbcp.ViburDBCPDataSource.class, org.postgresql.ds.PGSimpleDataSource.class, + org.apache.commons.dbcp2.BasicDataSource.class, org.apache.tomcat.jdbc.pool.DataSource.class, + org.h2.jdbcx.JdbcDataSource.class, org.postgresql.ds.PGSimpleDataSource.class, org.springframework.jdbc.datasource.SimpleDriverDataSource.class, - org.apache.tomcat.jdbc.pool.DataSource.class) + org.vibur.dbcp.ViburDBCPDataSource.class) .forEach((dataSourceType) -> { TypeHint typeHint = hints.getTypeHint(dataSourceType); assertThat(typeHint).withFailMessage(() -> "No hints found for data source type " + dataSourceType)