shaofengshi commented on code in PR #4407:
URL: https://github.com/apache/gravitino/pull/4407#discussion_r1706745987
##########
clients/client-java/src/main/java/org/apache/gravitino/client/HTTPClient.java:
##########
@@ -132,18 +132,17 @@ private HTTPClient(
* @return The response body as a string.
* @throws RESTException If an error occurs during conversion of the
response body to a string.
*/
- private String extractResponseBodyAsString(CloseableHttpResponse response) {
+
+private String extractResponseBodyAsString(CloseableHttpResponse response) {
try {
- if (response.getEntity() == null) {
- return null;
- }
-
- // EntityUtils.toString returns null when HttpEntity.getContent returns
null.
- return EntityUtils.toString(response.getEntity(), "UTF-8");
+ if (response.getEntity() == null) {
+ return null;
+ }
+ return EntityUtils.toString(response.getEntity(),
StandardCharsets.UTF_8);
} catch (IOException | ParseException e) {
- throw new RESTException(e, "Failed to convert HTTP response body to
string");
Review Comment:
This is a format change, I guess it will break the spotless check rules, did
you ever run gradle successfully after making this change?
--
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]