
Anonymous
Not applicable
2018-12-21
11:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Identity transform tjavarow, reflection fields
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.
167 Views
1 Solution
Accepted Solutions

Anonymous
Not applicable
2018-12-21
11:37 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oops, used input_row twice.. it worked after I fixed it
167 Views
1 Reply

Anonymous
Not applicable
2018-12-21
11:37 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oops, used input_row twice.. it worked after I fixed it
168 Views
