@SuppressWarnings("BooleanMethodIsAlwaysInverted") private boolean pathMatches(AssignmentPath assignmentPath, List<OrderConstraintsType> definedOrderConstraints) { if (assignmentPath == null) { throw new IllegalStateException("Check this. Assignment path is null."); } if (assignmentPath.isEmpty()) { throw new IllegalStateException("Check this. Assignment path is empty."); } return assignmentPath.matches(definedOrderConstraints); }