in old/dekaf-core/src/main/java/org/jetbrains/dekaf/intermediate/AdaptIntermediateStructCollectingCursor.java [142:174]
private Object makeRow(final Object[] componentValues) {
final Object row;
try {
row = myRowConstructor.newInstance();
}
catch (Exception e) {
throw new DBFetchingException(format("Failed to instantiate class %s: error %s: %s",
myResultLayout.row.rowClass.getName(),
e.getClass().getSimpleName(),
e.getMessage()),
e, null);
}
for (int i = 0, n = myRowClassFields.length; i < n; i++) {
final Field f = myRowClassFields[i];
final Object value = componentValues[i];
if (value == null) continue;
try {
f.set(row, value);
}
catch (IllegalAccessException e) {
throw new DBFetchingException(format("Failed to assign field %s of class %s with a value of class %s: error %s: %s. The value: \"%s\"",
f.getName(), row.getClass().getName(), value.getClass().getSimpleName(),
e.getClass().getSimpleName(), e.getMessage(),
value.toString()),
e, null);
}
}
return row;
}