@Override
public Version getLinearSuccessor() throws RepositoryException {
return perform(new SessionOperation<Version>("getLinearSuccessor") {
@Override
public Version perform() throws RepositoryException {
VersionHistoryDelegate vHistory = getVersionManagerDelegate()
.createVersionHistory(dlg.getParent());
Iterator<VersionDelegate> it = vHistory.getAllLinearVersions();
// search for this version ...
while (it.hasNext()) {
VersionDelegate vDlg = it.next();
if (vDlg.getIdentifier().equals(dlg.getIdentifier())
&& it.hasNext()) {