Condition<VirtualFile> () { Condition<VirtualFile> condition = getExcludeFileCondition(); if (condition == null) return getConstantExcludeConditionAsCondition(); Condition<VirtualFile> otherCondition = getConstantExcludeConditionAsCondition(); if (otherCondition == null) return condition; return file -> condition.value(file) || otherCondition.value(file); }