ApplyPatchStatus (@Nullable ApplyPatchStatus lhs, @Nullable ApplyPatchStatus rhs) { if (lhs == null) return rhs; if (rhs == null) return lhs; Set<ApplyPatchStatus> statuses = ContainerUtil.newHashSet(lhs, rhs); if (PARTIAL_ADDITIONAL_SET.equals(statuses)) return PARTIAL; return ORDERING.max(lhs, rhs); }