Add a null check

This commit is contained in:
James Agnew 2017-05-30 10:05:27 -04:00
parent 6168f4ab32
commit 3db4091601
1 changed files with 4 additions and 0 deletions

View File

@ -1112,6 +1112,10 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> implements IDao {
} }
IFhirResourceDao<R> dao = getDao(theResourceType); IFhirResourceDao<R> dao = getDao(theResourceType);
if (dao == null) {
throw new InternalErrorException("No DAO for resource type: " + theResourceType.getName());
}
Set<Long> ids = dao.searchForIds(paramMap); Set<Long> ids = dao.searchForIds(paramMap);
return ids; return ids;