Skip to content

Commit 5d75d11

Browse files
committed
Final call should be to GetSerializableType
1 parent 4a441ec commit 5d75d11

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/NHibernate/Type/TypeFactory.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ private static IType HeuristicType(System.Type typeClass, IDictionary<string, st
654654
if (length.HasValue)
655655
return GetSerializableType(typeClass, length.Value);
656656

657-
return GetSerializedOrBasicType(typeClass);
657+
return GetSerializableType(typeClass);
658658
}
659659

660660
/// <summary>
@@ -722,11 +722,6 @@ private static NullableType GetType(NullableType defaultUnqualifiedType, byte pr
722722
/// </para>
723723
/// </remarks>
724724
public static NullableType GetSerializableType(System.Type serializableType)
725-
{
726-
return (NullableType) GetSerializedOrBasicType(serializableType);
727-
}
728-
729-
private static IType GetSerializedOrBasicType(System.Type serializableType)
730725
{
731726
var key = serializableType.AssemblyQualifiedName;
732727

@@ -747,7 +742,7 @@ private static IType GetSerializedOrBasicType(System.Type serializableType)
747742
throw new HibernateException($"Another item with the key {type.Name} has already been added to typeByTypeOfName.");
748743
}
749744

750-
return type;
745+
return (NullableType) type;
751746
}
752747

753748
public static NullableType GetSerializableType(System.Type serializableType, int length)

0 commit comments

Comments
 (0)