/** lower returns preceding element */ public void testDescendingLower() { NavigableSet q = dset5(); Object e1 = q.lower(m3); assertEquals(m2, e1); Object e2 = q.lower(m6); assertEquals(m5, e2); Object e3 = q.lower(m1); assertNull(e3); Object e4 = q.lower(zero); assertNull(e4); }
/** lower returns preceding element */ public void testLower() { NavigableSet q = set5(); Object e1 = q.lower(three); assertEquals(two, e1); Object e2 = q.lower(six); assertEquals(five, e2); Object e3 = q.lower(one); assertNull(e3); Object e4 = q.lower(zero); assertNull(e4); }
/** * Creates a new OpenDJ upgrader. * * @param installRoot The installation root of the embedded OpenDS instance, which is usually * {@code ~/openam/opends}. */ public OpenDJUpgrader(final String installRoot, final ServletContext servletCtx) { this.installRoot = installRoot; this.servletCtx = servletCtx; this.upgradeMarker = new File(installRoot + "/.upgrade_marker"); // Determine the current version. Note that if the upgrade marker exists // then that implies that OpenDS was only partially upgraded. this.newVersion = readNewVersion(); this.versionHistory = getVersionHistory(); if (upgradeMarker.exists() && versionHistory.last() == newVersion) { // Previous upgrade has not completed, so the last version is not // accurate. this.currentVersion = versionHistory.lower(newVersion); } else { this.currentVersion = versionHistory.last(); } }