errose28 commented on a change in pull request #2684:
URL: https://github.com/apache/ozone/pull/2684#discussion_r718705574
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/DatanodeIdYaml.java
##########
@@ -105,6 +106,12 @@ public static DatanodeDetails readDatanodeIdFile(File path)
.setCurrentVersion(datanodeDetailsYaml.getCurrentVersion());
datanodeDetails = builder.build();
+ } catch (NullPointerException e) {
Review comment:
Handling an unchecked exception like this is usually bad practice.
Especially in a large try/catch block like this where it's unclear what the
cause is. Can we refactor this to explicitly handle the null reference before
it is dereferenced?
--
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]