egvr2002 commented on issue #9081:
URL: https://github.com/apache/gravitino/issues/9081#issuecomment-3520056526
Thanks for the assignment ( :
I noticed two different coding styles for determining the operation type
based on `request.isInUse()`:
- In
`server/src/main/java/org/apache/gravitino/server/web/rest/PolicyOperations.java`
the operation type is first assigned to a variable and then reused:
```java
OperationType op = request.isEnable() ? OperationType.ENABLE :
OperationType.DISABLE;
```
- In
`server/src/main/java/org/apache/gravitino/server/web/rest/MetalakeOperations.java`
the operation type is first assigned to a variable and then reused::
```java
if (request.isInUse()) {
metalakeDispatcher.enableMetalake(identifier);
} else {
metalakeDispatcher.disableMetalake(identifier);
}
```
Here's an example where it's called again in the same file:
```java
return ExceptionHandlers.handleMetalakeException(
request.isInUse() ? OperationType.ENABLE : OperationType.DISABLE,
metalakeName, e);
```
Would you prefer one style over the other? I think standardizing on a single
approach would help maintain consistency across the codebase. Please let me
know your preference.
--
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]