[ 
https://issues.apache.org/jira/browse/STORM-3051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla closed STORM-3051.
----------------------------------
    Resolution: Won't Fix

We are in the process of migrating our issue tracking system to GitHub issues. 
This issue has been stale for the last 5 years, and STORM has evolved with many 
dependency updates since this issue was last updated.

If the issue persists in the latest version of Storm, please feel free to 
reopen it or provide new context. Thank you very much!

> some  Potential NPEs 
> ---------------------
>
>                 Key: STORM-3051
>                 URL: https://issues.apache.org/jira/browse/STORM-3051
>             Project: Apache Storm
>          Issue Type: Bug
>            Reporter: lujie
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> We have developed a static analysis tool 
> [NPEDetector|https://github.com/lujiefsi/NPEDetector] to find some potential 
> NPE. Our analysis shows that some callees may return null in corner case(e.g. 
> node crash , IO exception), some of their callers have  _!=null_ check but 
> some do not have. 
> *Bug:*
> 1.  callee CgroupCenter#getSubSystems return null when meet exception:
> {code:java}
> } catch (Exception e) {
> LOG.error("Get subSystems error {}", e);
> }
> return null;
> {code}
> but its caller use it without check:
> {code:java}
> public boolean isSubSystemEnabled(SubSystemType subSystemType) {
>   Set<SubSystem> subSystems = this.getSubSystems();
>   for (SubSystem subSystem : subSystems) {
>      if (subSystem.getType() == subSystemType) {
>      return true;
>   }
>   }
>   return false;
> }{code}
> other callee and caller pair that have same problem.
> 2. callee RAS_Node#getUsedSlots and caller RAS_Node#totalSlotsUsed
>  3. CgroupCenter#getHierarchies and caller CgroupCenter#isMounted, 
> CgroupCenter#getHierarchyWithSubSystems
> 4. callee LocalState#getApprovedWorkers and caller 
> BasicContainer#cleanUpForRestart,BasicContainer#<init>



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to