Skip to content

Commit

Permalink
HHH-17926 Refactor: using qualified name
Browse files Browse the repository at this point in the history
# change
1. using Class.getName() replace Class.toString()
  • Loading branch information
FULaBUla committed Apr 13, 2024
1 parent 1f8af8c commit 0b8574b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1500,9 +1500,9 @@ public SqmDynamicInstantiation<?> visitInstantiation(HqlParser.InstantiationCont
}

if ( !dynamicInstantiation.checkInstantiation( creationContext.getTypeConfiguration() ) ) {
final Class<?> type = dynamicInstantiation.getJavaType();
final String qualifiedName = dynamicInstantiation.getJavaType().getName();
if ( dynamicInstantiation.isFullyAliased() ) {
throw new SemanticException("Missing constructor or attributes for injection into type '" + type + "'" +
throw new SemanticException("Missing constructor or attributes for injection into type '" + qualifiedName + "'" +
"Expected arguments are: " + dynamicInstantiation.argumentTypes(), query);
}
else {
Expand All @@ -1516,7 +1516,7 @@ public SqmDynamicInstantiation<?> visitInstantiation(HqlParser.InstantiationCont
.collect(Collectors.joining(","));
}

throw new SemanticException("Unable to locate appropriate constructor on class '" + type + "'. " +
throw new SemanticException("Unable to locate appropriate constructor on class '" + qualifiedName + "'. " +
"Expected arguments are: " + dynamicInstantiation.argumentTypes() + conjecture, query);
}
}
Expand Down

0 comments on commit 0b8574b

Please sign in to comment.