nastra commented on code in PR #15251:
URL: https://github.com/apache/iceberg/pull/15251#discussion_r2781079673


##########
core/src/main/java/org/apache/iceberg/stats/BaseContentStats.java:
##########
@@ -120,8 +120,7 @@ public <T> T get(int pos, Class<T> javaClass) {
   @SuppressWarnings({"unchecked", "rawtypes", "CyclomaticComplexity"})
   @Override
   public <T> void set(int pos, T value) {
-    if (value instanceof GenericRecord) {
-      GenericRecord record = (GenericRecord) value;
+    if (value instanceof GenericRecord record) {

Review Comment:
   yes, this makes use of the new JDK17 style and saves us from having to do an 
explicit cast



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to