dramaticlly commented on code in PR #11437: URL: https://github.com/apache/iceberg/pull/11437#discussion_r1826214271
########## core/src/main/java/org/apache/iceberg/util/PropertyUtil.java: ########## @@ -57,6 +67,19 @@ public static double propertyAsDouble( return defaultValue; } + public static int propertyTryAsInt( + Map<String, String> properties, String property, int defaultValue) { + String value = properties.get(property); + if (value != null) { + try { + return Integer.parseInt(value); + } catch (NumberFormatException e) { + return defaultValue; Review Comment: I feel a bit weird about empty catch clause as hurt readability a bit, so I tried to invert the if condition so that we still have 3 return statement but reads better. what do you think? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org