xiangfu0 commented on code in PR #10293:
URL: https://github.com/apache/pinot/pull/10293#discussion_r1110973216


##########
pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/AbstractBaseAdminCommand.java:
##########
@@ -101,11 +102,14 @@ public static String sendRequest(String requestMethod, 
String urlString, String
     try {
       return readInputStream(conn.getInputStream());
     } catch (Exception e) {
-      return readInputStream(conn.getErrorStream());
+      if (conn.getErrorStream() != null) {
+        return readInputStream(conn.getErrorStream());
+      }
+      throw new IOException("Request failed due to connection error", e);
     }
   }
 
-  private static String readInputStream(InputStream inputStream)
+  private static String readInputStream(@NotNull InputStream inputStream)

Review Comment:
   We only annotation @nullable and assume all the methods signature is not 
null.
   



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