mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-16 16:15:06 +00:00
HHH-12335 StrategySelectorImpl can avoid some unnecessary String formatting during bootstrap
This commit is contained in:
parent
c3e5390048
commit
0b24f333c9
@ -63,25 +63,29 @@ public <T> void registerStrategyImplementor(Class<T> strategy, String name, Clas
|
||||
|
||||
final Class old = namedStrategyImplementorMap.put( name, implementation );
|
||||
if ( old == null ) {
|
||||
log.trace(
|
||||
String.format(
|
||||
"Registering named strategy selector [%s] : [%s] -> [%s]",
|
||||
strategy.getName(),
|
||||
name,
|
||||
implementation.getName()
|
||||
)
|
||||
);
|
||||
if ( log.isTraceEnabled() ) {
|
||||
log.trace(
|
||||
String.format(
|
||||
"Registering named strategy selector [%s] : [%s] -> [%s]",
|
||||
strategy.getName(),
|
||||
name,
|
||||
implementation.getName()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
log.debug(
|
||||
String.format(
|
||||
"Registering named strategy selector [%s] : [%s] -> [%s] (replacing [%s])",
|
||||
strategy.getName(),
|
||||
name,
|
||||
implementation.getName(),
|
||||
old.getName()
|
||||
)
|
||||
);
|
||||
if ( log.isDebugEnabled() ) {
|
||||
log.debug(
|
||||
String.format(
|
||||
"Registering named strategy selector [%s] : [%s] -> [%s] (replacing [%s])",
|
||||
strategy.getName(),
|
||||
name,
|
||||
implementation.getName(),
|
||||
old.getName()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user