[jOOQ/jOOQ#17537] Wrong error message with DataTypeException: "Cannot

cast [T] to [T]"
This commit is contained in:
Lukas Eder 2024-11-05 12:44:20 +01:00
parent db10aed045
commit 716fbeb22f

View File

@ -134,7 +134,7 @@ public final class DefaultConverterProvider implements ConverterProvider, Serial
if (uWrapper.isInstance(t))
return uWrapper.cast(t);
else
throw new DataTypeException("Cannot cast from " + tWrapper + " (instance type: " + t.getClass() + " to " + tWrapper);
throw new DataTypeException("Cannot cast from " + tWrapper + " (instance type: " + t.getClass() + ") to " + uWrapper);
},
u -> tWrapper.cast(u)
);