HHH-15124 Relax usage of DeprecationLogger: avoid some confusing reports
This commit is contained in:
parent
6a7afe8efc
commit
8c8a097e12
|
@ -246,12 +246,7 @@ public final class FastSessionServices {
|
|||
() -> defaultSessionProperties.get( AvailableSettings.FLUSH_MODE ),
|
||||
() -> {
|
||||
final Object oldSetting = defaultSessionProperties.get( org.hibernate.jpa.AvailableSettings.FLUSH_MODE );
|
||||
if ( oldSetting != null ) {
|
||||
DeprecationLogger.DEPRECATION_LOGGER.deprecatedSetting(
|
||||
org.hibernate.jpa.AvailableSettings.FLUSH_MODE,
|
||||
AvailableSettings.FLUSH_MODE
|
||||
);
|
||||
}
|
||||
//Not invoking the DeprecationLogger in this case as the user can't avoid using this property (the string value is the same)
|
||||
return oldSetting;
|
||||
}
|
||||
);
|
||||
|
|
|
@ -274,12 +274,7 @@ public class SessionImpl
|
|||
() -> getSessionProperty( AvailableSettings.FLUSH_MODE ),
|
||||
() -> {
|
||||
final Object oldSetting = getSessionProperty( org.hibernate.jpa.AvailableSettings.FLUSH_MODE );
|
||||
if ( oldSetting != null ) {
|
||||
DeprecationLogger.DEPRECATION_LOGGER.deprecatedSetting(
|
||||
org.hibernate.jpa.AvailableSettings.FLUSH_MODE,
|
||||
AvailableSettings.FLUSH_MODE
|
||||
);
|
||||
}
|
||||
//Not invoking the DeprecationLogger in this case as the user can't avoid using this property (the string value is the same)
|
||||
return oldSetting;
|
||||
}
|
||||
);
|
||||
|
|
|
@ -62,12 +62,7 @@ public class CdiBeanContainerBuilder {
|
|||
() -> cfgService.getSetting( AvailableSettings.DELAY_CDI_ACCESS, StandardConverters.BOOLEAN ),
|
||||
() -> {
|
||||
final Boolean oldSetting = cfgService.getSetting( org.hibernate.jpa.AvailableSettings.DELAY_CDI_ACCESS, StandardConverters.BOOLEAN );
|
||||
if ( oldSetting != null ) {
|
||||
DeprecationLogger.DEPRECATION_LOGGER.deprecatedSetting(
|
||||
org.hibernate.jpa.AvailableSettings.DELAY_CDI_ACCESS,
|
||||
AvailableSettings.DELAY_CDI_ACCESS
|
||||
);
|
||||
}
|
||||
//Not invoking the DeprecationLogger in this case as the user can't avoid using this property (the string value is the same)
|
||||
return oldSetting;
|
||||
},
|
||||
() -> false
|
||||
|
|
|
@ -564,9 +564,8 @@ public class SchemaManagementToolCoordinator {
|
|||
() -> configurationValues.get( JAKARTA_HBM2DDL_DATABASE_ACTION ),
|
||||
() -> {
|
||||
final Object setting = configurationValues.get( HBM2DDL_DATABASE_ACTION );
|
||||
if ( setting != null ) {
|
||||
DEPRECATION_LOGGER.deprecatedSetting( HBM2DDL_DATABASE_ACTION, JAKARTA_HBM2DDL_DATABASE_ACTION );
|
||||
}
|
||||
//Not using the DEPRECATION_LOGGER as while this branch understands Jakarta configuration,
|
||||
//it's not meant to be the primary one yet.
|
||||
return setting;
|
||||
}
|
||||
);
|
||||
|
@ -579,9 +578,8 @@ public class SchemaManagementToolCoordinator {
|
|||
() -> configurationValues.get( JAKARTA_HBM2DDL_SCRIPTS_ACTION ),
|
||||
() -> {
|
||||
final Object setting = configurationValues.get( HBM2DDL_SCRIPTS_ACTION );
|
||||
if ( setting != null ) {
|
||||
DEPRECATION_LOGGER.deprecatedSetting( HBM2DDL_SCRIPTS_ACTION, JAKARTA_HBM2DDL_SCRIPTS_ACTION );
|
||||
}
|
||||
//Not using the DEPRECATION_LOGGER as while this branch understands Jakarta configuration,
|
||||
//it's not meant to be the primary one yet.
|
||||
return setting;
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue