Skip to content

Commit 6d93d41

Browse files
committed
prevent ClassCastException in UUID obtention
1 parent 71f127a commit 6d93d41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/com/cloud/api/dispatch/ParamProcessWorker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ private Long translateUuidToInternalId(final String uuid, final Parameter annota
534534
for (final Class<?> entity : entities) {
535535
CallContext.current().putContextParameter(entity, internalId);
536536
final Object objVO = _entityMgr.findByIdIncludingRemoved(entity, internalId);
537-
if (objVO == null) {
537+
if (!(objVO instanceof Identity)) {
538538
continue;
539539
}
540540
CallContext.current().putApiResourceUuid(annotation.name(), ((Identity) objVO).getUuid());

0 commit comments

Comments
 (0)