@@ -38,13 +38,8 @@ internal static bool TryGetType (string javaClassName, [NotNullWhen (true)] out
3838
3939	internal  static bool  TryGetJavaClassName  ( Type  type ,  [ NotNullWhen  ( true ) ]  out  string ?  className ) 
4040	{ 
41- 		string ?  fullName  =  type . FullName ; 
42- 		if  ( fullName  is  null )  { 
43- 			className  =  null ; 
44- 			return  false ; 
45- 		} 
46- 
47- 		ulong  hash  =  Hash  ( fullName ) ; 
41+ 		string  name  =  $ "{ type . FullName } , { type . Assembly . GetName  ( ) . Name } "; 
42+ 		ulong  hash  =  Hash  ( name ) ; 
4843
4944		// the hashes array is sorted and all the hashes are unique 
5045		int  javaClassNameIndex  =  MemoryExtensions . BinarySearch  ( TypeNameHashes ,  hash ) ; 
@@ -60,17 +55,17 @@ internal static bool TryGetJavaClassName (Type type, [NotNullWhen (true)] out st
6055
6156		// ensure this is not a hash collision 
6257		var  resolvedType  =  GetTypeByIndex  ( JavaClassNameIndexToTypeIndex  [ javaClassNameIndex ] ) ; 
63- 		if  ( resolvedType ? . FullName  !=  type . FullName )  { 
58+ 		if  ( resolvedType ? . AssemblyQualifiedName  !=  type . AssemblyQualifiedName )  { 
6459			className  =  null ; 
6560			return  false ; 
6661		} 
6762
6863		return  true ; 
6964	} 
7065
71- 	private  static ulong  Hash  ( string  javaClassName ) 
66+ 	private  static ulong  Hash  ( string  value ) 
7267	{ 
73- 		ReadOnlySpan < byte >  bytes  =  MemoryMarshal . AsBytes  ( javaClassName . AsSpan  ( ) ) ; 
68+ 		ReadOnlySpan < byte >  bytes  =  MemoryMarshal . AsBytes  ( value . AsSpan  ( ) ) ; 
7469		ulong  hash  =  XxHash3 . HashToUInt64  ( bytes ) ; 
7570
7671		// The bytes in the hashes array are stored as little endian. If the target platform is big endian, 
0 commit comments