long () { if (! detectStartRevision()) return myStartNumber; long latestOk = myStartNumber; try { if (myEndNumber == -1) { myEndNumber = getLatestRevision(); } // TODO: At least binary search could be applied here for optimization for (long i = myStartNumber + 1; i < myEndNumber; i++) { if (existsInRevision(myUrl, i)) { latestOk = i; } } } catch (SvnBindException e) { LOG.info(e); } return latestOk; }