Skip to content

Commit c133390

Browse files
mprokopchuksureshanaparti
authored andcommitted
Fix logical condition in AsyncJobDaoImpl and ResourceIdSupport
1 parent ac17a77 commit c133390

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

framework/jobs/src/main/java/org/apache/cloudstack/framework/jobs/dao/AsyncJobDaoImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public List<AsyncJobVO> findInstancePendingAsyncJobs(String instanceType, Long a
153153
public AsyncJobVO findJob(Long id, Long resourceId, String resourceType) {
154154
SearchCriteria<AsyncJobVO> sc = byIdResourceIdResourceTypeSearch.create();
155155

156-
if (id == null && resourceId == null && StringUtils.isNotBlank(resourceType)) {
156+
if (id == null && resourceId == null && StringUtils.isBlank(resourceType)) {
157157
logger.debug("findJob called with all null parameters");
158158
return null;
159159
}

server/src/main/java/com/cloud/api/query/ResourceIdSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public interface ResourceIdSupport {
5454
default Long getResourceId(ApiCommandResourceType resourceType, String resourceUuid) {
5555
String uuid = getResourceUuid(resourceUuid);
5656

57-
if (resourceType == null || uuid == null) {
57+
if (resourceType == null && uuid == null) {
5858
return null;
5959
} else if ((resourceType == null) ^ (uuid == null)) {
6060
throw new InvalidParameterValueException(String.format("Both %s and %s required",

0 commit comments

Comments
 (0)