nastra commented on code in PR #16881:
URL: https://github.com/apache/iceberg/pull/16881#discussion_r3452404695
##########
core/src/main/java/org/apache/iceberg/puffin/PuffinReader.java:
##########
@@ -71,13 +71,10 @@ public FileMetadata fileMetadata() throws IOException {
PuffinCompressionCodec footerCompression = PuffinCompressionCodec.NONE;
for (Flag flag : decodeFlags(footer, footerStructOffset)) {
- switch (flag) {
- case FOOTER_PAYLOAD_COMPRESSED:
- footerCompression = PuffinFormat.FOOTER_COMPRESSION_CODEC;
- break;
- default:
- throw new IllegalStateException("Unsupported flag: " + flag);
- }
+ footerCompression =
+ switch (flag) {
+ case FOOTER_PAYLOAD_COMPRESSED ->
PuffinFormat.FOOTER_COMPRESSION_CODEC;
Review Comment:
yes agree that we should keep this here and in a few other places that
remove the `default` branch
--
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]