Hi,
Please find the latest report on new defect(s) introduced to cloudstack found
with Coverity Scan.
2 new defect(s) introduced to cloudstack found with Coverity Scan.
4 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent
build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 1341073: Null pointer dereferences (FORWARD_NULL)
/server/src/com/cloud/api/ApiServer.java: 676 in
com.cloud.api.ApiServer.queueCommand(org.apache.cloudstack.api.BaseCmd,
java.util.Map, java.lang.StringBuilder)()
________________________________________________________________________________________________________
*** CID 1341073: Null pointer dereferences (FORWARD_NULL)
/server/src/com/cloud/api/ApiServer.java: 676 in
com.cloud.api.ApiServer.queueCommand(org.apache.cloudstack.api.BaseCmd,
java.util.Map, java.lang.StringBuilder)()
670 Long instanceId = (objectId == null) ?
asyncCmd.getInstanceId() : objectId;
671
672 // users can provide the job id they want to use, so log as
it is a uuid and is unique
673 String injectedJobId = asyncCmd.getInjectedJobId();
674 _uuidMgr.checkUuidSimple(injectedJobId, AsyncJob.class);
675
>>> CID 1341073: Null pointer dereferences (FORWARD_NULL)
>>> Calling a method on null object "caller".
676 AsyncJobVO job = new AsyncJobVO("", callerUserId,
caller.getId(), cmdObj.getClass().getName(),
677 ApiGsonHelper.getBuilder().create().toJson(params),
instanceId,
678 asyncCmd.getInstanceType() != null ?
asyncCmd.getInstanceType().toString() : null,
679 injectedJobId);
680 job.setDispatcher(_asyncDispatcher.getName());
681
** CID 1341076: Control flow issues (DEADCODE)
/server/src/com/cloud/api/ApiServer.java: 658 in
com.cloud.api.ApiServer.queueCommand(org.apache.cloudstack.api.BaseCmd,
java.util.Map, java.lang.StringBuilder)()
________________________________________________________________________________________________________
*** CID 1341076: Control flow issues (DEADCODE)
/server/src/com/cloud/api/ApiServer.java: 658 in
com.cloud.api.ApiServer.queueCommand(org.apache.cloudstack.api.BaseCmd,
java.util.Map, java.lang.StringBuilder)()
652 }
653
654 long startEventId = ctx.getStartEventId();
655 asyncCmd.setStartEventId(startEventId);
656
657 // save the scheduled event
>>> CID 1341076: Control flow issues (DEADCODE)
>>> Execution cannot reach this expression "1L" inside statement "eventId =
>>> com.cloud.event.A...".
658 final Long eventId =
659
ActionEventUtils.onScheduledActionEvent((callerUserId == null) ?
(Long)User.UID_SYSTEM : callerUserId, asyncCmd.getEntityOwnerId(),
asyncCmd.getEventType(),
660 asyncCmd.getEventDescription(),
asyncCmd.isDisplay(), startEventId);
661 if (startEventId == 0) {
662 // There was no create event before, set current event
id as start eventId
663 startEventId = eventId;
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
https://scan.coverity.com/projects/cloudstack?tab=overview
To manage Coverity Scan email notifications for "[email protected]",
click
https://scan.coverity.com/subscriptions/edit?email=dev%40cloudstack.apache.org&token=494aabd5ba647999fa41b6d766646231