Code review

This commit is contained in:
Nick Goupinets 2021-06-22 15:23:03 -04:00
parent 95012623f6
commit 5c9f2617da
1 changed files with 6 additions and 6 deletions

View File

@ -69,18 +69,18 @@ public final class MdmResourceUtil {
return resourceHasTag(theBaseResource, MdmConstants.SYSTEM_GOLDEN_RECORD_STATUS, MdmConstants.CODE_GOLDEN_RECORD_REDIRECTED); return resourceHasTag(theBaseResource, MdmConstants.SYSTEM_GOLDEN_RECORD_STATUS, MdmConstants.CODE_GOLDEN_RECORD_REDIRECTED);
} }
private static boolean resourceHasTag(IBaseResource theTheBaseResource, String theSystem, String theCode) { private static boolean resourceHasTag(IBaseResource theBaseResource, String theSystem, String theCode) {
if (theTheBaseResource == null) { if (theBaseResource == null) {
return false; return false;
} }
return theTheBaseResource.getMeta().getTag(theSystem, theCode) != null; return theBaseResource.getMeta().getTag(theSystem, theCode) != null;
} }
private static boolean resourceHasTagWithSystem(IBaseResource theTheBaseResource, String theSystem) { private static boolean resourceHasTagWithSystem(IBaseResource theBaseResource, String theSystem) {
if (theTheBaseResource == null) { if (theBaseResource == null) {
return false; return false;
} }
return theTheBaseResource.getMeta().getTag().stream().anyMatch(tag -> tag.getSystem().equalsIgnoreCase(theSystem)); return theBaseResource.getMeta().getTag().stream().anyMatch(tag -> tag.getSystem().equalsIgnoreCase(theSystem));
} }
private static Optional<? extends IBaseCoding> getTagWithSystem(IBaseResource theResource, String theSystem) { private static Optional<? extends IBaseCoding> getTagWithSystem(IBaseResource theResource, String theSystem) {