stevenzwu commented on code in PR #17357:
URL: https://github.com/apache/iceberg/pull/17357#discussion_r3648128797
##########
AGENTS.md:
##########
@@ -94,6 +94,7 @@ The `api/` module has the strongest stability guarantees —
breaking changes ar
- Comments and Javadocs should describe the current behavior or contract, not
how it changed over time.
- `} else {` on same line. Minimize variable scope. `try-with-resources` for
all `AutoCloseable`.
- Prefer method references over lambdas. Wrap lines at the highest semantic
level.
+- Prefer switch expressions (`case X -> ...`) over statement switches; an
exhaustive enum switch needs no `default`.
Review Comment:
Good catch on the risk of over-generalizing. I want to keep the bullet terse
to match the surrounding style, and I'd rather leave the
informative-error-message advice out of this one since it's really about
exception messages, not switches. Pushed a tighter version:
> Prefer switch expressions (`case X -> ...`) over statement switches.
Exhaustive enum switches need no `default`; others must have one.
WDYT?
--
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]