maedhroz commented on code in PR #1962:
URL: https://github.com/apache/cassandra/pull/1962#discussion_r1040075041
##########
src/java/org/apache/cassandra/config/Config.java:
##########
@@ -1171,8 +1173,9 @@ public static void log(Config config)
String value;
try
{
- // Field.get() can throw NPE if the value of the field is null
- value = field.get(config).toString();
+ // don't use exceptions for normal control flow!
+ Object obj = field.get(config);
+ value = obj != null ? obj.toString() : "null";
Review Comment:
I also don't see any reason to retain the new comment, since it's a reaction
to a previous decision that has been wiped out anyway.
--
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]