sanha commented on a change in pull request #240: [NEMO-424] Fix Sonarcloud
bugs regarding Optional
URL: https://github.com/apache/incubator-nemo/pull/240#discussion_r332819348
##########
File path:
runtime/common/src/main/java/org/apache/nemo/runtime/common/message/ncs/NcsMessageEnvironment.java
##########
@@ -91,21 +91,23 @@ public void removeListener(final String listenerId) {
@Override
public <T> Future<MessageSender<T>> asyncConnect(final String receiverId,
final String listenerId) {
- try {
- // If the connection toward the receiver exists already, reuses it.
- final Connection connection;
- if (receiverToConnectionMap.containsKey(receiverId)) {
- connection = receiverToConnectionMap.get(receiverId);
- } else {
- connection =
connectionFactory.newConnection(idFactory.getNewInstance(receiverId));
+ // If the connection toward the receiver exists already, reuses it.
+ final Connection connection;
+
+ if (receiverToConnectionMap.containsKey(receiverId)) {
+ connection = receiverToConnectionMap.get(receiverId);
+ } else {
+ connection =
connectionFactory.newConnection(idFactory.getNewInstance(receiverId));
Review comment:
Please check the indentation.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services