remove more NPE, fix old test
This commit is contained in:
parent
fb8def21ae
commit
0a9d5344e3
|
@ -385,8 +385,8 @@ class RuleImplOp extends BaseRule /* implements IAuthRule */ {
|
|||
|
||||
List<RuntimeSearchParam> params = sourceDef.getSearchParamsForCompartmentName(compartmentOwnerResourceType);
|
||||
|
||||
Set<String> additionalParamNames = myAdditionalCompartmentSearchParamMap.get(sourceDef.getName().toLowerCase());
|
||||
List<RuntimeSearchParam> additionalParams = additionalParamNames.stream().map(paramName -> sourceDef.getSearchParam(paramName)).collect(Collectors.toList());
|
||||
Set<String> additionalParamNames = myAdditionalCompartmentSearchParamMap.getOrDefault(sourceDef.getName().toLowerCase(), new HashSet<>());
|
||||
List<RuntimeSearchParam> additionalParams = additionalParamNames.stream().map(sourceDef::getSearchParam).collect(Collectors.toList());
|
||||
if (params == null || params.isEmpty()) {
|
||||
params = additionalParams;
|
||||
} else {
|
||||
|
|
|
@ -480,17 +480,6 @@ public class AuthorizationInterceptorR4Test {
|
|||
carePlan = new CarePlan();
|
||||
carePlan.setStatus(CarePlan.CarePlanStatus.ACTIVE);
|
||||
carePlan.getSubject().setResource(patient);
|
||||
|
||||
Device d = new Device();
|
||||
d.getPatient().setResource(patient);
|
||||
|
||||
ourHitMethod = false;
|
||||
ourReturn = Collections.singletonList(d);
|
||||
httpGet = new HttpGet("http://localhost:" + ourPort + "/Device/123456");
|
||||
status = ourClient.execute(httpGet);
|
||||
extractResponseAndClose(status);
|
||||
assertEquals(200, status.getStatusLine().getStatusCode());
|
||||
assertTrue(ourHitMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue