HHH-15029 Small refactoring in JndiServiceImpl: no need to use a Properties for the context configuration

This commit is contained in:
Sanne Grinovero 2022-01-14 20:35:18 +00:00 committed by Sanne Grinovero
parent 1b2508e4e0
commit 73e936b280
1 changed files with 2 additions and 3 deletions

View File

@ -8,7 +8,6 @@ package org.hibernate.engine.jndi.internal;
import java.util.Hashtable;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import javax.naming.Context;
import javax.naming.InitialContext;
@ -57,8 +56,8 @@ public class JndiServiceImpl implements JndiService {
* @return The extracted JNDI specific properties.
*/
@SuppressWarnings({ "unchecked" })
private static Properties extractJndiProperties(Map configurationValues) {
final Properties jndiProperties = new Properties();
private static Hashtable extractJndiProperties(Map configurationValues) {
final Hashtable jndiProperties = new Hashtable();
for ( Map.Entry entry : (Set<Map.Entry>) configurationValues.entrySet() ) {
if ( !String.class.isInstance( entry.getKey() ) ) {