gnodet-bot commented on code in PR #29836:
URL: https://github.com/apache/camel/pull/29836#discussion_r4562752935
##########
components/camel-openfga/src/main/java/org/apache/camel/component/openfga/OpenFgaEndpoint.java:
##########
@@ -142,6 +142,19 @@ protected void doStart() throws Exception {
* decision and is a thoroughly misleading thing to debug.
*/
private void validateOperationOptions() {
+ if (operation == OpenFgaOperation.batchCheck) {
+ if (configuration.getBatchCheckMode() == null) {
Review Comment:
⚠️ **Dead null check** — `getBatchCheckMode()` can never return `null`
because the field is declared with a non-null default
(`OpenFgaBatchCheckMode.client`). This guard will never trigger unless someone
deliberately calls `setBatchCheckMode(null)` on a programmatic configuration,
which is an unsupported misuse.
The check and its error message give a misleading impression that `null` is
a valid API state to defend against. Remove it and simplify:
```suggestion
if (configuration.getBatchCheckMode() ==
OpenFgaBatchCheckMode.server) {
```
--
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]