throw new IllegalArgumentException("Cannot remove scan instance for proxy alerts");
}
if(scanInstance.isActive()) {
throw new IllegalArgumentException("Cannot remove active scan instance");
}
scanInstanceEventManager.fireEvent(new RemoveScanInstanceEvent(scanInstance));
if(activeScanInstanceList.contains(scanInstance)) {
activeScanInstanceList.remove(scanInstance);
}
scanInstance.deleteScanInstance();
database.delete(scanInstance);