Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: None

      Description

      We have developed a static analysis tool 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:

      Cluster#getAssignmentById has 20 callers, 18 callers have null checker like this:

      SchedulerAssignment assignment = cluster.getAssignmentById(td.getId());
      if (assignment != null) {
          cpuNeeded -= getCpuUsed(assignment);
           memoryNeeded -= getMemoryUsed(assignment);
      }
      

      the caller have no null checker :ConstraintSolverStrategy#checkSpreadSchedulingValid ConstraintSolverStrategy#checkConstraintsSatisfied.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                xiaoheipangzi lujie
                Reporter:
                xiaoheipangzi lujie
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h