Closed sunmingtao closed 4 years ago
Convert
Work localWork = parent; while (localWork != null) { removeOCR(sess, localWork); localWork = localWork.getParent(); }
to Stream.iterate(parent, Objects::nonNull, Work::getParent).forEach(work -> removeOCR(sess, work));
Stream.iterate(parent, Objects::nonNull, Work::getParent).forEach(work -> removeOCR(sess, work));
Convert
to
Stream.iterate(parent, Objects::nonNull, Work::getParent).forEach(work -> removeOCR(sess, work));