This is an automated email from the ASF dual-hosted git repository.
jmclean pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new 629944e4e6 [#7632] reuse dataOperation in Utils (#7655)
629944e4e6 is described below
commit 629944e4e6d6407346cceae53b784ba3f107664f
Author: Yunchi Pang <[email protected]>
AuthorDate: Thu Jul 10 17:41:37 2025 -0700
[#7632] reuse dataOperation in Utils (#7655)
### What changes were proposed in this pull request?
Replace the second usage of
`httpRequest.getHeader(FilesetAuditConstants.HTTP_HEADER_FILESET_DATA_OPERATION)`
with `dataOperation` which was previously defined.
### Why are the changes needed?
Cleaner and less code.
Fix: #7632
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Existing tests.
---
server-common/src/main/java/org/apache/gravitino/server/web/Utils.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/server-common/src/main/java/org/apache/gravitino/server/web/Utils.java
b/server-common/src/main/java/org/apache/gravitino/server/web/Utils.java
index 2e50150bd4..175d70b8e6 100644
--- a/server-common/src/main/java/org/apache/gravitino/server/web/Utils.java
+++ b/server-common/src/main/java/org/apache/gravitino/server/web/Utils.java
@@ -213,8 +213,7 @@ public class Utils {
String dataOperation =
httpRequest.getHeader(FilesetAuditConstants.HTTP_HEADER_FILESET_DATA_OPERATION);
- if (StringUtils.isNotBlank(
-
httpRequest.getHeader(FilesetAuditConstants.HTTP_HEADER_FILESET_DATA_OPERATION)))
{
+ if (StringUtils.isNotBlank(dataOperation)) {
filteredHeaders.put(
FilesetAuditConstants.HTTP_HEADER_FILESET_DATA_OPERATION,
FilesetDataOperation.checkValid(dataOperation)