You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/07/18 05:47:18 UTC

[GitHub] [cassandra] maedhroz commented on a change in pull request #685: CASSANDRA-15766 NoSpamLogger arguments building objects on hot paths

maedhroz commented on a change in pull request #685:
URL: https://github.com/apache/cassandra/pull/685#discussion_r456753504



##########
File path: src/java/org/apache/cassandra/net/InboundMessageHandler.java
##########
@@ -692,6 +692,12 @@ String id()
         return SocketFactory.channelId(peer, self, type, channel.id().asShortText());
     }
 
+    @Override
+    public String toString()
+    {
+        return id();
+    }

Review comment:
       Assuming there isn't something that actually relied on the default `Object#toString()`, this seemed like a reasonable way to solve the construction problem here. We get the laziness we want, and we get it from `this`, the already created enclosing instance.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org