Skip to content

Commit

Permalink
HHH-17926 Refactor: instead of stream processing
Browse files Browse the repository at this point in the history
# change
1. use StringHelper.join() instead of stream processing
  • Loading branch information
FULaBUla committed Apr 18, 2024
1 parent 3f36dff commit d14dcdf
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.hibernate.grammars.hql.HqlParser;
import org.hibernate.grammars.hql.HqlParserBaseVisitor;
import org.hibernate.internal.util.CharSequenceHelper;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.internal.util.collections.Stack;
import org.hibernate.internal.util.collections.StandardStack;
import org.hibernate.metamodel.CollectionClassification;
Expand Down Expand Up @@ -1510,10 +1511,7 @@ public SqmDynamicInstantiation<?> visitInstantiation(HqlParser.InstantiationCont

String conjecture = "";
if ( list != null && !list.isEmpty() ) {
conjecture = "mismatch at position " +
list.stream()
.map(InstantiationHelper.MismatchConstructorFieldPositionInfo::toString)
.collect(Collectors.joining(","));
conjecture = "mismatch at position " + StringHelper.join( ",", list );
}

throw new SemanticException( "Missing constructor for class '" + qualifiedName + "' with parameter types ["
Expand Down

0 comments on commit d14dcdf

Please sign in to comment.