You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/04/14 03:15:22 UTC
[GitHub] [iotdb] HTHou commented on a diff in pull request #5414: [IOTDB-2842] SHOW PIPE PipeName throws NPE if receiverService isn't initialize
HTHou commented on code in PR #5414:
URL: https://github.com/apache/iotdb/pull/5414#discussion_r850050026
##########
server/src/main/java/org/apache/iotdb/db/sync/receiver/manager/ReceiverManager.java:
##########
@@ -93,7 +93,13 @@ public void dropPipe(String pipeName, String remoteIp) throws IOException {
}
public List<PipeInfo> getPipeInfos(String pipeName) {
- return new ArrayList<>(pipeInfoMap.get(pipeName).values());
+ List<PipeInfo> res;
+ if (pipeInfoMap.containsKey(pipeName)) {
+ res = new ArrayList<>(pipeInfoMap.get(pipeName).values());
+ } else {
+ res = new ArrayList<>();
Review Comment:
```suggestion
res = Collections.emptyList();
```
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org