Skip to content

Commit 2224342

Browse files
change validation before casting
1 parent 1e8512b commit 2224342

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
import org.apache.cloudstack.backup.dao.BackupScheduleDao;
6363
import org.apache.cloudstack.context.CallContext;
6464
import org.apache.cloudstack.framework.config.ConfigKey;
65-
import org.apache.cloudstack.framework.jobs.AsyncJob;
6665
import org.apache.cloudstack.framework.jobs.AsyncJobDispatcher;
6766
import org.apache.cloudstack.framework.jobs.AsyncJobManager;
6867
import org.apache.cloudstack.framework.jobs.impl.AsyncJobVO;
@@ -674,7 +673,7 @@ protected void sendExceededBackupLimitAlert(String ownerUuid, Resource.ResourceT
674673
* @return The backup schedule ID. Returns null if the backup has been manually created
675674
*/
676675
protected Long getBackupScheduleId(Object job) {
677-
if (!(job instanceof AsyncJob)) {
676+
if (!(job instanceof AsyncJobVO)) {
678677
return null;
679678
}
680679

0 commit comments

Comments
 (0)