tmgodinho commented on code in PR #7658:
URL: https://github.com/apache/ignite-3/pull/7658#discussion_r2853501164
##########
modules/api/src/main/java/org/apache/ignite/table/mapper/MapperBuilder.java:
##########
@@ -152,11 +151,21 @@ private void ensureNotStale() {
* @throws IllegalArgumentException If a field is {@code null} or if the
class has no declared field with the given name.
*/
private String requireValidField(String fieldName) {
- try {
- if (fieldName == null || targetType.getDeclaredField(fieldName) ==
null) {
- throw new IllegalArgumentException("Mapping for a column
already exists: " + fieldName);
- }
- } catch (NoSuchFieldException e) {
+ if (fieldName == null) {
+ throw new IllegalArgumentException("Mapping for a column already
exists: " + fieldName);
Review Comment:
I did not want to change the behaviour of the method regarding errors.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]