From cb5fe2645a0860123bf0aa1cd7706fbf209d681a Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Tue, 14 Jan 2020 12:49:31 +0000 Subject: [PATCH] Code Clean up --- .../src/main/java/org/hibernate/mapping/SimpleValue.java | 4 +--- .../hibernate/metamodel/mapping/EmbeddableMappingType.java | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java b/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java index c875c4c70d..a3d1fe2656 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java @@ -450,9 +450,7 @@ public boolean isSimpleValue() { } public boolean isValid(Mapping mapping) throws MappingException { - int columnSpan = getColumnSpan(); - int typeColumnSpan = getType().getColumnSpan( mapping ); - return columnSpan == typeColumnSpan; + return getColumnSpan() == getType().getColumnSpan( mapping ); } // public Type getType() throws MappingException { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EmbeddableMappingType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EmbeddableMappingType.java index 093b52e317..e740222c4f 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EmbeddableMappingType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EmbeddableMappingType.java @@ -178,11 +178,6 @@ else if ( subtype instanceof CompositeType ) { ); } else if ( subtype instanceof EntityType ) { - final Dialect dialect = creationProcess.getCreationContext() - .getSessionFactory() - .getJdbcServices() - .getDialect(); - final SingularAssociationAttributeMapping singularAssociationAttributeMapping = MappingModelCreationHelper.buildSingularAssociationAttributeMapping( bootPropertyDescriptor.getName(), attributeIndex,