github-advanced-security[bot] commented on code in PR #6891:
URL: https://github.com/apache/hive/pull/6891#discussion_r4299578299


##########
standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogServlet.java:
##########
@@ -57,35 +61,94 @@
     return "Iceberg REST Catalog";
   }
 
+  @Override
+  protected void doGet(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);

Review Comment:
   ## SonarCloud / Exceptions should not be thrown from servlet methods
   
   <!--SONAR_ISSUE_KEY:AaFGpM-uKVsE09HnUA0H-->Handle the following exception 
that could be thrown by "execute": IOException. <p>See more on <a 
href="https://sonarcloud.io/project/issues?id=apache_hive&issues=AaFGpM-uKVsE09HnUA0H&open=AaFGpM-uKVsE09HnUA0H&pullRequest=6891";>SonarQube
 Cloud</a></p>
   
   [Show more 
details](https://github.com/apache/hive/security/code-scanning/469)



##########
standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogServlet.java:
##########
@@ -57,35 +61,94 @@
     return "Iceberg REST Catalog";
   }
 
+  @Override
+  protected void doGet(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);

Review Comment:
   ## SonarCloud / Exceptions should not be thrown from servlet methods
   
   <!--SONAR_ISSUE_KEY:AaFGpM-uKVsE09HnUA0I-->Handle the following exception 
that could be thrown by "from": IOException. <p>See more on <a 
href="https://sonarcloud.io/project/issues?id=apache_hive&issues=AaFGpM-uKVsE09HnUA0I&open=AaFGpM-uKVsE09HnUA0I&pullRequest=6891";>SonarQube
 Cloud</a></p>
   
   [Show more 
details](https://github.com/apache/hive/security/code-scanning/470)



##########
standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogServlet.java:
##########
@@ -57,35 +61,94 @@
     return "Iceberg REST Catalog";
   }
 
+  @Override
+  protected void doGet(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);
+  }
+
+  @Override
+  protected void doHead(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);

Review Comment:
   ## SonarCloud / Exceptions should not be thrown from servlet methods
   
   <!--SONAR_ISSUE_KEY:AaFGpM-uKVsE09HnUA0K-->Handle the following exception 
that could be thrown by "from": IOException. <p>See more on <a 
href="https://sonarcloud.io/project/issues?id=apache_hive&issues=AaFGpM-uKVsE09HnUA0K&open=AaFGpM-uKVsE09HnUA0K&pullRequest=6891";>SonarQube
 Cloud</a></p>
   
   [Show more 
details](https://github.com/apache/hive/security/code-scanning/472)



##########
standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogServlet.java:
##########
@@ -57,35 +61,94 @@
     return "Iceberg REST Catalog";
   }
 
+  @Override
+  protected void doGet(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);
+  }
+
+  @Override
+  protected void doHead(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);
+  }
+
+  @Override
+  protected void doPost(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);
+  }
+
+  @Override
+  protected void doDelete(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);

Review Comment:
   ## SonarCloud / Exceptions should not be thrown from servlet methods
   
   <!--SONAR_ISSUE_KEY:AaFGpM-uKVsE09HnUA0O-->Handle the following exception 
that could be thrown by "from": IOException. <p>See more on <a 
href="https://sonarcloud.io/project/issues?id=apache_hive&issues=AaFGpM-uKVsE09HnUA0O&open=AaFGpM-uKVsE09HnUA0O&pullRequest=6891";>SonarQube
 Cloud</a></p>
   
   [Show more 
details](https://github.com/apache/hive/security/code-scanning/476)



##########
standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogServlet.java:
##########
@@ -57,35 +61,94 @@
     return "Iceberg REST Catalog";
   }
 
+  @Override
+  protected void doGet(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);
+  }
+
+  @Override
+  protected void doHead(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);
+  }
+
+  @Override
+  protected void doPost(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);
+  }
+
+  @Override
+  protected void doDelete(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);

Review Comment:
   ## SonarCloud / Exceptions should not be thrown from servlet methods
   
   <!--SONAR_ISSUE_KEY:AaFGpM-uKVsE09HnUA0N-->Handle the following exception 
that could be thrown by "execute": IOException. <p>See more on <a 
href="https://sonarcloud.io/project/issues?id=apache_hive&issues=AaFGpM-uKVsE09HnUA0N&open=AaFGpM-uKVsE09HnUA0N&pullRequest=6891";>SonarQube
 Cloud</a></p>
   
   [Show more 
details](https://github.com/apache/hive/security/code-scanning/475)



##########
standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogServlet.java:
##########
@@ -57,35 +61,94 @@
     return "Iceberg REST Catalog";
   }
 
+  @Override
+  protected void doGet(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);
+  }
+
+  @Override
+  protected void doHead(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);
+  }
+
+  @Override
+  protected void doPost(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);

Review Comment:
   ## SonarCloud / Exceptions should not be thrown from servlet methods
   
   <!--SONAR_ISSUE_KEY:AaFGpM-uKVsE09HnUA0M-->Handle the following exception 
that could be thrown by "from": IOException. <p>See more on <a 
href="https://sonarcloud.io/project/issues?id=apache_hive&issues=AaFGpM-uKVsE09HnUA0M&open=AaFGpM-uKVsE09HnUA0M&pullRequest=6891";>SonarQube
 Cloud</a></p>
   
   [Show more 
details](https://github.com/apache/hive/security/code-scanning/474)



##########
standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogServlet.java:
##########
@@ -57,35 +61,94 @@
     return "Iceberg REST Catalog";
   }
 
+  @Override
+  protected void doGet(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);
+  }
+
+  @Override
+  protected void doHead(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);

Review Comment:
   ## SonarCloud / Exceptions should not be thrown from servlet methods
   
   <!--SONAR_ISSUE_KEY:AaFGpM-uKVsE09HnUA0J-->Handle the following exception 
that could be thrown by "execute": IOException. <p>See more on <a 
href="https://sonarcloud.io/project/issues?id=apache_hive&issues=AaFGpM-uKVsE09HnUA0J&open=AaFGpM-uKVsE09HnUA0J&pullRequest=6891";>SonarQube
 Cloud</a></p>
   
   [Show more 
details](https://github.com/apache/hive/security/code-scanning/471)



##########
standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogServlet.java:
##########
@@ -57,35 +61,94 @@
     return "Iceberg REST Catalog";
   }
 
+  @Override
+  protected void doGet(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);
+  }
+
+  @Override
+  protected void doHead(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);
+  }
+
+  @Override
+  protected void doPost(HttpServletRequest request, HttpServletResponse 
response)
+      throws IOException {
+    execute(ServletRequestContext.from(request), response);

Review Comment:
   ## SonarCloud / Exceptions should not be thrown from servlet methods
   
   <!--SONAR_ISSUE_KEY:AaFGpM-uKVsE09HnUA0L-->Handle the following exception 
that could be thrown by "execute": IOException. <p>See more on <a 
href="https://sonarcloud.io/project/issues?id=apache_hive&issues=AaFGpM-uKVsE09HnUA0L&open=AaFGpM-uKVsE09HnUA0L&pullRequest=6891";>SonarQube
 Cloud</a></p>
   
   [Show more 
details](https://github.com/apache/hive/security/code-scanning/473)



-- 
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]

Reply via email to