mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-27 21:01:15 +08:00
Merge pull request #684 from Shredder121/constructorexpression_exception_string
invoke the toString method on the Class objects.
This commit is contained in:
commit
9b709c2bfd
@ -71,15 +71,9 @@ public class ConstructorExpression<T> extends ExpressionBase<T> implements Facto
|
||||
}
|
||||
}
|
||||
// prepare error message
|
||||
StringBuilder formattedTypes = new StringBuilder();
|
||||
for (Class<?> typ : givenTypes) {
|
||||
if (formattedTypes.length() > 0) {
|
||||
formattedTypes.append(", ");
|
||||
}
|
||||
formattedTypes.append(typ.getName());
|
||||
}
|
||||
String parameters = Arrays.toString(givenTypes);
|
||||
throw new ExpressionException("Got no matching constructor. Class: " +
|
||||
type.getName() +", parameters: " + formattedTypes.toString());
|
||||
type.getName() +", parameters: " + parameters);
|
||||
}
|
||||
|
||||
public static <D> ConstructorExpression<D> create(Class<D> type, Expression<?>... args) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user