@@ -33,7 +33,7 @@ public class HikariConfigurationUtil {
3333 * @return a HikariConfig
3434 */
3535 public static HikariConfig loadConfiguration (Map <String ,Object > props ) {
36- Properties hikariProps = new Properties ();
36+ final Properties hikariProps = new Properties ();
3737 copyProperty ( JdbcSettings .AUTOCOMMIT , props , "autoCommit" , hikariProps );
3838
3939 copyProperty (
@@ -74,9 +74,10 @@ public static HikariConfig loadConfiguration(Map<String,Object> props) {
7474
7575 copyIsolationSetting ( props , hikariProps );
7676
77- for ( String key : props .keySet () ) {
77+ for ( var entry : props .entrySet () ) {
78+ final String key = entry .getKey ();
7879 if ( key .startsWith ( CONFIG_PREFIX ) ) {
79- hikariProps .setProperty ( key .substring ( CONFIG_PREFIX .length () ), ( String ) props . get ( key ) );
80+ hikariProps .setProperty ( key .substring ( CONFIG_PREFIX .length () ), entry . getValue (). toString ( ) );
8081 }
8182 }
8283
@@ -85,7 +86,7 @@ public static HikariConfig loadConfiguration(Map<String,Object> props) {
8586
8687 private static void copyProperty (String srcKey , Map <String ,Object > src , String dstKey , Properties dst ) {
8788 if ( src .containsKey ( srcKey ) ) {
88- dst .setProperty ( dstKey , ( String ) src .get ( srcKey ) );
89+ dst .setProperty ( dstKey , src .get ( srcKey ). toString ( ) );
8990 }
9091 }
9192
0 commit comments