eliminate dupe log message
This commit is contained in:
parent
c92c2f5f21
commit
c18b7c90fe
|
@ -13,8 +13,9 @@ import org.hibernate.boot.Metadata;
|
||||||
import org.hibernate.boot.spi.MetadataBuildingContext;
|
import org.hibernate.boot.spi.MetadataBuildingContext;
|
||||||
import org.hibernate.internal.CoreLogging;
|
import org.hibernate.internal.CoreLogging;
|
||||||
import org.hibernate.internal.CoreMessageLogger;
|
import org.hibernate.internal.CoreMessageLogger;
|
||||||
import org.hibernate.internal.util.ReflectHelper;
|
|
||||||
|
|
||||||
|
import static org.hibernate.internal.util.ReflectHelper.overridesEquals;
|
||||||
|
import static org.hibernate.internal.util.ReflectHelper.overridesHashCode;
|
||||||
import static org.hibernate.internal.util.StringHelper.nullIfEmpty;
|
import static org.hibernate.internal.util.StringHelper.nullIfEmpty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -325,17 +326,15 @@ public class RootClass extends PersistentClass implements TableOwner, SoftDeleta
|
||||||
* <em>correct</em>) we simply log a warning.
|
* <em>correct</em>) we simply log a warning.
|
||||||
*/
|
*/
|
||||||
private void checkCompositeIdentifier() {
|
private void checkCompositeIdentifier() {
|
||||||
if ( getIdentifier() instanceof Component id ) {
|
if ( getIdentifier() instanceof Component id
|
||||||
if ( !id.isDynamic() ) {
|
&& !id.isDynamic() ) {
|
||||||
final Class<?> idClass = id.getComponentClass();
|
final Class<?> idClass = id.getComponentClass();
|
||||||
if ( idClass != null ) {
|
if ( idClass != null ) {
|
||||||
final String idComponentClassName = idClass.getName();
|
if ( !overridesEquals( idClass ) ) {
|
||||||
if ( !ReflectHelper.overridesEquals( idClass ) ) {
|
LOG.compositeIdClassDoesNotOverrideEquals( idClass.getName() );
|
||||||
LOG.compositeIdClassDoesNotOverrideEquals( idComponentClassName );
|
}
|
||||||
}
|
else if ( !overridesHashCode( idClass ) ) {
|
||||||
if ( !ReflectHelper.overridesHashCode( idClass ) ) {
|
LOG.compositeIdClassDoesNotOverrideHashCode( idClass.getName() );
|
||||||
LOG.compositeIdClassDoesNotOverrideHashCode( idComponentClassName );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue