[#3046] UDTRecordImpl.toString() may throw NullPointerException, if custom RecordMapperProvider maps Record to null

This commit is contained in:
Lukas Eder 2014-02-14 16:06:07 +01:00
parent 993668e9df
commit 1ba0b3f6fe

View File

@ -148,11 +148,16 @@ public class UDTRecordImpl<R extends UDTRecord<R>> extends AbstractRecord implem
result.append(create().render(getUDT()));
result.append("(");
for (Object o : intoArray()) {
result.append(separator);
result.append(o);
Object[] array = intoArray();
separator = ", ";
// [#3046] array can be null if custom RecordMapperProviders (illegally) return null
if (array != null) {
for (Object o : array) {
result.append(separator);
result.append(o);
separator = ", ";
}
}
result.append(")");