Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to just trying to copy input fields to output fields, using tJavarow, and I'm getting the error java.lang.IllegalArgumentException: Can not set boolean field.
This is my code,
Field[] input_row_f = input_row.getClass().getDeclaredFields(); Field[] output_row_f = input_row.getClass().getDeclaredFields(); for (int i = 0; i < input_row_f.length; i++) { Field input_field = input_row_f[i]; Field output_field = output_row_f[i]; int mod = input_field.getModifiers(); if (!Modifier.isStatic(mod) && Modifier.isPublic(mod)) { output_field.set(output_row, input_field.get(input_row)); } }
Shouldn't this work?
I'm not even changing the values from one to the other, and the schema is the same in both directions.