devmadhuu commented on code in PR #5249:
URL: https://github.com/apache/ozone/pull/5249#discussion_r1319411879


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/AccessHeatMapEndpoint.java:
##########
@@ -88,4 +92,19 @@ public Response getReadAccessMetaData(
     }
     return Response.ok(entityReadAccessHeatMapResponse).build();
   }
+
+  private static void checkIfHeatMapFeatureIsEnabled() {
+    FeatureProvider.Feature heatMapFeature = null;
+    List<FeatureProvider.Feature> allDisabledFeatures =
+        FeatureProvider.getAllDisabledFeatures();
+    for (FeatureProvider.Feature feature : allDisabledFeatures) {
+      if (feature.getFeatureName().equals("HeatMap")) {

Review Comment:
   > nit: to avoid NPE. Constant should be on left side e.g. 
`"HeatMap".equals(feature.getFeatureName())` or use `Objects.equals()`.
   
   Thanks @hemantk-12  for noticing this, however this line will not hit NPE 
because if any disabled features are there, then this list will be populated  
as Feature enum with non-null feature name, however , yes, as a good practice, 
we should use Constant on left side. Thank you.



-- 
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]

Reply via email to