13 Aug, 2013
4 commits
-
Converted comments to javadoc. git-svn-id: https://svn.forgerock.org/opendj/trunk@9404 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9403 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…at files can cope with the absence of the file, we can remove it completely. CR-2142 git-svn-id: https://svn.forgerock.org/opendj/trunk@9402 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Upgraded to grizzly 2.3.5 which removes grizzly-rcm dependency :) git-svn-id: https://svn.forgerock.org/opendj/trunk@9401 41b1ffd8-f28e-4786-ab96-9950f0a78031
12 Aug, 2013
3 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9400 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Hid low level JE's DatabaseException and ReplicationDBException from replication higher level code. They have been replaced by the newly created ChangelogException. Tidied up the exception handling by throwing or catching more specific exceptions. Moved some code to protect them with try / catch. Adding a few catch for specific handling of ChangelogException. Threw ChangelogException instead of Exception. Added handleUnexpectedDatabaseException() methods. ReplicationDBException.java: REMOVED (now useless) replication*.properties: Removed ERR_COULD_NOT_INITIALIZE_DB, not adding anything to ERR_COULD_NOT_READ_DB. Removed "this." from member method invocations. Used Integer.parseInt(). Used StaticUtils.close(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9399 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Removed another 200 lines. Extracted several methods: newSet(), generateChangeNumbers(), checkDn(), assertDnEquals(), debugAndWriteEntries(), createDomain(), runDeleteOperation(), assertOnlyDoneMsgReceived. Removed useless / unused / plain wrong code. Removed commented out code. assertTrue() => assertEquals(). Used assertj assertThat(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9398 41b1ffd8-f28e-4786-ab96-9950f0a78031
11 Aug, 2013
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9397 41b1ffd8-f28e-4786-ab96-9950f0a78031
09 Aug, 2013
8 commits
-
In ECLTwoDomains(), inverted 2 parameters to fix another test failure. git-svn-id: https://svn.forgerock.org/opendj/trunk@9396 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9395 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
In ECLAfterChangelogTrim(), inverted 2 parameters to fix a test failure. Used AutoRefactor plugin. Extracted method waitForClose(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9394 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Improved javadocs. ExternalChangeLogTest.java: In ECLTwoDomains(), fixed the test. Extracted runModifyOperation() and createMods(). PersistentSearchChangeType.java, ChangeOperationType.java: Improved javadocs. Increased vertical density. Code cleanup. LDAPReplicationDomain.java: Added comments / javadocs. DraftCNDB.java: Used static import to put if conditions on just one line. git-svn-id: https://svn.forgerock.org/opendj/trunk@9393 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Knocked off 500 lines of code by extracting various methods. This makes the code easier to read even though it is still sometimes puzzling. git-svn-id: https://svn.forgerock.org/opendj/trunk@9392 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Collapsed try/finally embedded in try/catch into single try/catch/finally statements. Used a static import for OperationStatus.SUCCESS to help readability with if statement conditions. In count(), moved the cursor variable inside findFirstCounterRecordAfterStartPoint() and findFirstCounterRecordBeforeStopPoint() to ease readability. In ReplServerDBCursor ctor, removed an uneeded else statement (because of an early exit) git-svn-id: https://svn.forgerock.org/opendj/trunk@9391 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Removed 400 lines of code by: - Used TestCaseUtils.findFreePort(). - Removed try / catch / fail test anti pattern + let the exceptions go up the stack. - Extracted methods stop(), assertEntries(). - Used interfaces instead of concrete classes. - Converting comments to javadocs. - Removed useless parameters in readLastCookie(). - Removed unnecessary creations of new String objects. - Removed unnecessary calls to toString() in string concatenations. - Reduced variable scopes. - Put code on one line to ease reading. git-svn-id: https://svn.forgerock.org/opendj/trunk@9390 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Used TestCaseUtils.findFreePort() instead of TestCaseUtils.bindFreePort(). Used StaticUtils.close(). Various refactorings: - Extracted a few simple methods - Comments to javadocs - Removed dead code - Inlined unnecessary local variables git-svn-id: https://svn.forgerock.org/opendj/trunk@9389 41b1ffd8-f28e-4786-ab96-9950f0a78031
08 Aug, 2013
5 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9388 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Changed getCount() return type from int to long (This change goes along with r9386). Extracted method addUpdate(), isDifferentGenerationId(), isSameGenerationId(), collectRSsEligibleForAssuredReplication(), toRSInfo(). In many places, renamed sid to serverId. Various cleanups: - converted comments to javadoc - added curly braces around if bodies - collapsed if statements - used interfaces instead of concrete classes - removed useless parentheses - removed useless 'this' qualifier in non static method calls - put code on one line where it fits MessageHandler.java: In add(), removed unused parameter MessageHandler. In getOlderUpdateCN(), removed useless reassignment of a local variable. git-svn-id: https://svn.forgerock.org/opendj/trunk@9387 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Changed count() return type from int to long. Removed a useless parameter from ReplicationIterator ctor. Various code cleanups in other classes. ReplicationDB.java: Extracted methods: - intializeCounters() from ctor. - insertCounterRecordIfNeeded() and newCounterRecord() from addEntries(). - toChangeNumber(byte[]) - getRegularRecord() from getPreviousChangeNumber(). - findFirstCounterRecordAfterStartPoint(), findFirstCounterRecordBeforeStopPoint() and computeDistance() from count(). Created method createReplicationKey() and moved ReplicationKey code there. In readFirstChange(), readLastChange(), getPreviousChangeNumber(), Renamed closeLockedCursor() to closeAndReleaseReadLock(). Renamed isaCounter() to isACounterRecord(). Changed count() return type from int to long. ReplicationKey.java: REMOVED Moved code to ReplicationDB.createReplicationKey(). ReplicationIterator.java In ctor, removed unused parameter id. DbHandler.java: Consequence of the change to ReplicationIterator ctor. Consequence of the change to ReplicationDB.count(). DbHandlerTest.java: Consequence of the change to ReplicationDB.count(). Extracted methods configureReplicationServer(), getReplicationDbPath(), createDirectory(), assertFoundInOrder(), assertNotFound(). TestCaseUtils.java: Added findFreePort(), findFreePorts(). bindFreePort() now delegates to bindPort(). ReplicationDbEnv.java: Renamed local variables for increased readability. git-svn-id: https://svn.forgerock.org/opendj/trunk@9386 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9385 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9384 41b1ffd8-f28e-4786-ab96-9950f0a78031
07 Aug, 2013
7 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9382 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9381 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Extracted methods readDomainBaseDNGenerationIDRecords(), readServerIdDomainBaseDNRecords(), toInt(), toLong() and toString() from start(). Extracted method putInStateDBIfNotExist() from getOrAddDb(). Extracted method deleteFromStateDB() from clearGenerationId() and clearServerId(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9380 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
HTTPServer.stop() has been deprecated, use HTTPServer.shutdownNow() instead. git-svn-id: https://svn.forgerock.org/opendj/trunk@9379 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
In getChanges(), simplified the code. In flush(), simplified the code and better explicited the role of the loop. Extracted encode() method. ArrayList => List. Other general code cleanups. git-svn-id: https://svn.forgerock.org/opendj/trunk@9378 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Inlined the testModify() method that does not take a Modification parameter. In the remaining testModify() method, moved the Modification parameter to be the last parameter. In buildMod(), removed a condition that became unnecessary after modifying the method calls to not pass down null. Transformed multi-line comments into one line comments where it fits. git-svn-id: https://svn.forgerock.org/opendj/trunk@9377 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
In testHistorical(), removed the EntryHistorical parameter (unused). Merged buildModWith2Vals() into buildMod(). Extracted method buildSyncHist() and assertContainsOnlyValues(). Removed useless try / catch. Removed useless if statements. Put all the calls to testModify() over one line only to ease readability. git-svn-id: https://svn.forgerock.org/opendj/trunk@9376 41b1ffd8-f28e-4786-ab96-9950f0a78031
06 Aug, 2013
10 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9375 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
- added init.d script to RPM package. git-svn-id: https://svn.forgerock.org/opendj/trunk@9374 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
In getDomainIterator(), never return null. Extracted methods findExportContainers() and findSearchContainers() Comments => javadocs. Concrete classes => interfaces. *.java: Removed null checks on the result of ReplicationServer.getDomainIterator(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9373 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
In next(), got rid of an Exception that should not happen. git-svn-id: https://svn.forgerock.org/opendj/trunk@9372 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
In getNextECLUpdate(): - used local variables for the oldestChange to ease readability - removed if (searchPhase == INIT_PHASE) in the while loop - removed the suffix local variable in favour of reading on the ECLUpdateMsg object - extracted method assignDraftCN() Renamed storeNewChange() to assignNewDraftCNAndStore() and removed all parameters but the ECLUpdateMsg parameter. DraftCNDbHandler.java: Used isEmpty() in the class. git-svn-id: https://svn.forgerock.org/opendj/trunk@9371 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
In initializeCLSearchFromDraftCN(), removed useless double assignment of draftCompat instance member. In findCookie(), created separate key local variables to query the drafCNDB to increase readability and reduce risk of errors. DraftCNDbHandler.java: Fixed checkstyle error. git-svn-id: https://svn.forgerock.org/opendj/trunk@9370 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Extracted method findCookie() and use the early exit technique to make the code hopefully easier to read. Also removed useless comments. Used DraftCNDbHandler.isEmpty(). Made several methods private. DraftCNDbHandler.java: Added isEmpty(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9369 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Many small changes to improve the readability of this code: Renamed getOldestChangeFromDomainCtxts() to findOldestChangeFromDomainCtxts() and return the actual DomainContext object instead of its index. Extracted methods initializeChangelogSearch() and hasCookieBeenTrimmedFromDB(). Renamed initializeCLDomCtxts() to initializeChangelogDomainCtxts(). Reduced variable scopes. git-svn-id: https://svn.forgerock.org/opendj/trunk@9368 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9367 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Extracted methods storeNewChange() to remove duplication and areSameChange() to ease readability. git-svn-id: https://svn.forgerock.org/opendj/trunk@9366 41b1ffd8-f28e-4786-ab96-9950f0a78031
05 Aug, 2013
2 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9365 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
MessageHandler.java: Removed instance members replicationServerId and replicationServerURL from the classes in org.opends.server.replication.server package (duplicated information already held on replicationServer). Added getReplicationServerURL(). ECLServerHandler.java: Removed duplicated code in ctors. In getNextECLUpdate(), tried to simplify reading of the code. *.java: Changed code as a consequence of the changes to MessageHandler. Made some fields private. In getMonitorData(), changed return type from ArrayList to List. git-svn-id: https://svn.forgerock.org/opendj/trunk@9364 41b1ffd8-f28e-4786-ab96-9950f0a78031