You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by GitBox <gi...@apache.org> on 2019/04/30 13:37:33 UTC

[GitHub] [storm] Ethanlm commented on a change in pull request #2997: [STORM-3380] Use Objects.equals to avoid possible NullPointerException

Ethanlm commented on a change in pull request #2997: [STORM-3380] Use Objects.equals to avoid possible NullPointerException
URL: https://github.com/apache/storm/pull/2997#discussion_r279756891
 
 

 ##########
 File path: storm-server/src/main/java/org/apache/storm/stats/StatsUtil.java
 ##########
 @@ -2004,7 +2005,7 @@ private static ComponentPageInfo thriftifyCompPageData(
         win2stats.put(FAILED, ClientStatsUtil.getMapByKey(data, WIN_TO_FAILED));
 
         String compType = (String) data.get(TYPE);
-        if (compType.equals(ClientStatsUtil.SPOUT)) {
+        if (Objects.equals(compType,ClientStatsUtil.SPOUT)) {
 
 Review comment:
   I agree. Maybe also consider throwing exceptions if it will ever be null. Need to understand it more

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


With regards,
Apache Git Services