for (Iterator<Relation> i = aDoc.getAllRelations().iterator(); i
.hasNext();) {
Relation link = i.next();
- if (!link.getClass().equals(VersionsRelation.class)) {
- continue;
+ if (link.getClass().equals(VersionsRelation.class)) {
+ previous = (Document) link.getTo(); // Versioned document
+ break;
}
- previous = (Document) link.getTo(); // Versioned document
- break;
}
}
if (aDoc.getProgressState() != null) {