Skip to content

Commit

Permalink
HHH-10715 Deleting more dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne committed Oct 25, 2020
1 parent 5b6f3ff commit ad6584f
Showing 1 changed file with 0 additions and 59 deletions.
Expand Up @@ -32,7 +32,6 @@
import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.mapping.Collection;
import org.hibernate.mapping.IndexedCollection;
import org.hibernate.mapping.Join;
import org.hibernate.mapping.KeyValue;
import org.hibernate.mapping.PersistentClass;
Expand Down Expand Up @@ -409,35 +408,6 @@ public ConverterDescriptor resolveElementAttributeConverterDescriptor(XProperty
.findAutoApplyConverterForCollectionElement( collectionXProperty, getContext() );
}

private Class determineElementClass(XClass elementXClass) {
if ( elementXClass != null ) {
try {
return getContext().getBootstrapContext().getReflectionManager().toClass( elementXClass );
}
catch (Exception e) {
log.debugf(
"Unable to resolve XClass [%s] to Class for collection elements [%s]",
elementXClass.getName(),
collection.getRole()
);
}
}

if ( collection.getElement() != null ) {
if ( collection.getElement().getType() != null ) {
return collection.getElement().getType().getReturnedClass();
}
}

// currently this is called from paths where the element type really should be known,
// so log the fact that we could not resolve the collection element info
log.debugf(
"Unable to resolve element information for collection [%s]",
collection.getRole()
);
return null;
}

public ConverterDescriptor mapKeyAttributeConverterDescriptor(XProperty mapXProperty, XClass keyXClass) {
AttributeConversionInfo info = locateAttributeConversionInfo( "key" );
if ( info != null ) {
Expand Down Expand Up @@ -466,33 +436,4 @@ public ConverterDescriptor mapKeyAttributeConverterDescriptor(XProperty mapXProp
.findAutoApplyConverterForMapKey( mapXProperty, getContext() );
}

private Class determineKeyClass(XClass keyXClass) {
if ( keyXClass != null ) {
try {
return getContext().getBootstrapContext().getReflectionManager().toClass( keyXClass );
}
catch (Exception e) {
log.debugf(
"Unable to resolve XClass [%s] to Class for collection key [%s]",
keyXClass.getName(),
collection.getRole()
);
}
}

final IndexedCollection indexedCollection = (IndexedCollection) collection;
if ( indexedCollection.getIndex() != null ) {
if ( indexedCollection.getIndex().getType() != null ) {
return indexedCollection.getIndex().getType().getReturnedClass();
}
}

// currently this is called from paths where the element type really should be known,
// so log the fact that we could not resolve the collection element info
log.debugf(
"Unable to resolve key information for collection [%s]",
collection.getRole()
);
return null;
}
}

0 comments on commit ad6584f

Please sign in to comment.