Index: src/main/java/org/apache/jackrabbit/mongomk/impl/model/CommitImpl.java =================================================================== --- src/main/java/org/apache/jackrabbit/mongomk/impl/model/CommitImpl.java (revision 1388461) +++ src/main/java/org/apache/jackrabbit/mongomk/impl/model/CommitImpl.java (working copy) @@ -46,7 +46,7 @@ * @param diff The diff. * @param message The message. */ - public CommitImpl(String path,String diff, String message) { + public CommitImpl(String path, String diff, String message) { this(path, diff, message, new LinkedList()); } Index: src/test/java/org/apache/jackrabbit/mongomk/command/CommitCommandMongoTest.java =================================================================== --- src/test/java/org/apache/jackrabbit/mongomk/command/CommitCommandMongoTest.java (revision 1388461) +++ src/test/java/org/apache/jackrabbit/mongomk/command/CommitCommandMongoTest.java (working copy) @@ -52,21 +52,21 @@ List instructions = new LinkedList(); instructions.add(new AddNodeInstructionImpl("/", "1")); - Commit commit = new CommitImpl("This is the 1st commit", "/", "+1 : {}", instructions); + Commit commit = new CommitImpl("/", "+1 : {}", "This is the 1st commit", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String firstRevisionId = command.execute(); instructions = new LinkedList(); instructions.add(new AddNodeInstructionImpl("/", "2")); - commit = new CommitImpl("This is the 2nd commit", "/", "+2 : {}", instructions); + commit = new CommitImpl("/", "+2 : {}", "This is the 2nd commit", instructions); command = new CommitCommandMongo(mongoConnection, commit); String secondRevisionId = command.execute(); instructions = new LinkedList(); instructions.add(new AddNodeInstructionImpl("/", "3")); - commit = new CommitImpl("This is the 3rd commit", "/", "+3 : {}", instructions); + commit = new CommitImpl("/", "+3 : {}", "This is the 3rd commit", instructions); command = new CommitCommandMongo(mongoConnection, commit); String thirdRevisionId = command.execute(); @@ -82,7 +82,8 @@ instructions.add(new AddNodeInstructionImpl("/a", "b")); instructions.add(new AddNodeInstructionImpl("/a", "c")); - Commit commit = new CommitImpl("This is a simple commit", "/", "+a : { b : {} , c : {} }", instructions); + Commit commit = new CommitImpl("/", "+a : { b : {} , c : {} }", + "This is a simple commit", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String revisionId = command.execute(); @@ -106,8 +107,9 @@ instructions.add(new AddPropertyInstructionImpl("/a/c", "key3", "value3")); instructions.add(new AddNodeInstructionImpl("/a", "c")); - Commit commit = new CommitImpl("This is a simple commit", "/", - "+a : { \"key1\" : \"value1\" , \"key2\" : \"value2\" , \"key3\" : \"value3\" }", instructions); + Commit commit = new CommitImpl("/", + "+a : { \"key1\" : \"value1\" , \"key2\" : \"value2\" , \"key3\" : \"value3\" }", + "This is a simple commit", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String revisionId = command.execute(); @@ -138,8 +140,9 @@ instructions.add(new AddNodeInstructionImpl("/a", "c")); instructions.add(new AddPropertyInstructionImpl("/a/c", "key3", "value3")); - Commit commit = new CommitImpl("This is a simple commit", "/", - "+a : { \"key1\" : \"value1\" , \"key2\" : \"value2\" , \"key3\" : \"value3\" }", instructions); + Commit commit = new CommitImpl("/", + "+a : { \"key1\" : \"value1\" , \"key2\" : \"value2\" , \"key3\" : \"value3\" }", + "This is a simple commit", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String revisionId = command.execute(); @@ -204,7 +207,8 @@ instructions.add(new AddNodeInstructionImpl("/a", "b")); instructions.add(new AddNodeInstructionImpl("/a", "c")); - Commit commit = new CommitImpl("This is a simple commit", "/", "+a : { b : {} , c : {} }", instructions); + Commit commit = new CommitImpl("/", "+a : { b : {} , c : {} }", + "This is a simple commit", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String revisionId = command.execute(); Assert.assertNotNull(revisionId); @@ -212,7 +216,7 @@ instructions = new LinkedList(); instructions.add(new RemoveNodeInstructionImpl("/", "a")); - commit = new CommitImpl("This is a simple commit", "/", "-a", instructions); + commit = new CommitImpl("/", "-a", "This is a simple commit", instructions); command = new CommitCommandMongo(mongoConnection, commit); revisionId = command.execute(); Assert.assertNotNull(revisionId); @@ -231,14 +235,14 @@ instructions.add(new AddNodeInstructionImpl("/", "a")); instructions.add(new AddNodeInstructionImpl("/a", "b")); - Commit commit = new CommitImpl("Add nodes", "/", "+a : { b : {} }", instructions); + Commit commit = new CommitImpl("/", "+a : { b : {} }", "Add nodes", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); command.execute(); instructions = new LinkedList(); instructions.add(new RemoveNodeInstructionImpl("/a", "c")); - commit = new CommitImpl("Non-existent node delete", "/a", "-c", instructions); + commit = new CommitImpl("/a", "-c", "Non-existent node delete", instructions); command = new CommitCommandMongo(mongoConnection, commit); try { command.execute(); @@ -255,7 +259,8 @@ instructions.add(new AddNodeInstructionImpl("/", "b")); instructions.add(new AddNodeInstructionImpl("/", "c")); - Commit commit = new CommitImpl("This is a simple commit", "/", "+a : { b : {} , c : {} }", instructions); + Commit commit = new CommitImpl("/", "+a : { b : {} , c : {} }", + "This is a simple commit", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String revisionId = command.execute(); @@ -276,8 +281,9 @@ instructions.add(new AddPropertyInstructionImpl("/a", "key2", "value2")); instructions.add(new AddPropertyInstructionImpl("/a", "key3", "value3")); - Commit commit = new CommitImpl("This is a simple commit", "/", - "+a : { \"key1\" : \"value1\" , \"key2\" : \"value2\" , \"key3\" : \"value3\" }", instructions); + Commit commit = new CommitImpl("/", + "+a : { \"key1\" : \"value1\" , \"key2\" : \"value2\" , \"key3\" : \"value3\" }", + "This is a simple commit", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String revisionId = command.execute(); @@ -298,11 +304,9 @@ instructions.add(new AddPropertyInstructionImpl("/a", "existed_key2", "value2")); instructions.add(new AddPropertyInstructionImpl("/a", "existed_key3", "value3")); - Commit commit = new CommitImpl( - "This is a simple commit", - "/", + Commit commit = new CommitImpl("/", "+a : { \"existed_key1\" : \"value1\" , \"existed_key2\" : \"value2\" , \"existed_key3\" : \"value3\" }", - instructions); + "This is a simple commit", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String revisionId = command.execute(); @@ -312,8 +316,9 @@ instructions.add(new AddPropertyInstructionImpl("/a", "key2", "value2")); instructions.add(new AddPropertyInstructionImpl("/a", "key3", "value3")); - commit = new CommitImpl("This is a simple commit", "/", - "+a : { \"key1\" : \"value1\" , \"key2\" : \"value2\" , \"key3\" : \"value3\" }", instructions); + commit = new CommitImpl("/", + "+a : { \"key1\" : \"value1\" , \"key2\" : \"value2\" , \"key3\" : \"value3\" }", + "This is a simple commit", instructions); command = new CommitCommandMongo(mongoConnection, commit); revisionId = command.execute(); @@ -333,7 +338,8 @@ instructions.add(new AddNodeInstructionImpl("/", "b")); instructions.add(new AddNodeInstructionImpl("/", "c")); - Commit commit = new CommitImpl("This is a simple commit", "/", "+a : { b : {} , c : {} }", instructions); + Commit commit = new CommitImpl("/", "+a : { b : {} , c : {} }", + "This is a simple commit", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String firstRevisionId = command.execute(); @@ -341,7 +347,7 @@ instructions.add(new AddNodeInstructionImpl("/a", "d")); instructions.add(new AddNodeInstructionImpl("/a", "e")); - commit = new CommitImpl("This is a simple commit", "/a", "+d: {} \n+e : {}", instructions); + commit = new CommitImpl("/a", "+d: {} \n+e : {}", "This is a simple commit", instructions); command = new CommitCommandMongo(mongoConnection, commit); String secondRevisionId = command.execute(); @@ -366,7 +372,7 @@ List instructions = new LinkedList(); instructions.add(new AddNodeInstructionImpl("", "/")); - Commit commit = new CommitImpl("This is the root commit", "", "+/ : {}", instructions); + Commit commit = new CommitImpl("", "+/ : {}", "This is the root commit", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String revisionId = command.execute(); Index: src/test/java/org/apache/jackrabbit/mongomk/command/ConcurrentCommitCommandMongoTest.java =================================================================== --- src/test/java/org/apache/jackrabbit/mongomk/command/ConcurrentCommitCommandMongoTest.java (revision 1388461) +++ src/test/java/org/apache/jackrabbit/mongomk/command/ConcurrentCommitCommandMongoTest.java (working copy) @@ -52,7 +52,8 @@ for (int i = 0; i < numOfConcurrentThreads; ++i) { List instructions = new LinkedList(); instructions.add(new AddNodeInstructionImpl("/", String.valueOf(i))); - Commit commit = new CommitImpl("This is a concurrent commit", "/", "+" + i + " : {}", instructions); + Commit commit = new CommitImpl("/", "+" + i + " : {}", + "This is a concurrent commit", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit) { @Override protected boolean saveAndSetHeadRevision() throws Exception { Index: src/test/java/org/apache/jackrabbit/mongomk/command/NodeExistsCommandMongoTest.java =================================================================== --- src/test/java/org/apache/jackrabbit/mongomk/command/NodeExistsCommandMongoTest.java (revision 1388461) +++ src/test/java/org/apache/jackrabbit/mongomk/command/NodeExistsCommandMongoTest.java (working copy) @@ -119,7 +119,7 @@ instructions.add(new AddNodeInstructionImpl("/a/b", "c")); instructions.add(new AddNodeInstructionImpl("/a/b/c", "d")); - Commit commit = new CommitImpl("Add nodes", "/", "TODO", instructions); + Commit commit = new CommitImpl("/", "TODO", "Add nodes", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); command.execute(); @@ -127,7 +127,7 @@ // Remove b. instructions = new LinkedList(); instructions.add(new RemoveNodeInstructionImpl("/a", "b")); - commit = new CommitImpl("Delete /b", "/a", "-b", instructions); + commit = new CommitImpl("/a", "-b", "Delete /b", instructions); command = new CommitCommandMongo(mongoConnection, commit); command.execute(); Index: src/test/java/org/apache/jackrabbit/mongomk/scenario/SimpleNodeScenario.java =================================================================== --- src/test/java/org/apache/jackrabbit/mongomk/scenario/SimpleNodeScenario.java (revision 1388461) +++ src/test/java/org/apache/jackrabbit/mongomk/scenario/SimpleNodeScenario.java (working copy) @@ -67,8 +67,9 @@ instructions.add(new AddPropertyInstructionImpl("/a/b", "string", "foo")); instructions.add(new AddPropertyInstructionImpl("/a/c", "bool", true)); - Commit commit = new CommitImpl("This is the simple node scenario with nodes /, /a, /a/b, /a/c", "/", - "+a : { \"int\" : 1 , \"b\" : { \"string\" : \"foo\" } , \"c\" : { \"bool\" : true } } }", instructions); + Commit commit = new CommitImpl("/", + "+a : { \"int\" : 1 , \"b\" : { \"string\" : \"foo\" } , \"c\" : { \"bool\" : true } } }", + "This is the simple node scenario with nodes /, /a, /a/b, /a/c", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String revisionId = command.execute(); @@ -80,7 +81,7 @@ for (int i = 1; i <= count; i++) { List instructions = new LinkedList(); instructions.add(new AddNodeInstructionImpl("/a", "child" + i)); - Commit commit = new CommitImpl("Add child" + i, "/a", "TODO", instructions); + Commit commit = new CommitImpl("/a", "TODO", "Add child" + i, instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); revisionId = command.execute(); } @@ -102,7 +103,8 @@ List instructions = new LinkedList(); instructions.add(new RemoveNodeInstructionImpl("/", "a")); - Commit commit = new CommitImpl("This is a commit with deleted /a", "/", "-a", instructions); + Commit commit = new CommitImpl("/", "-a", "This is a commit with deleted /a", + instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String revisionId = command.execute(); @@ -112,7 +114,8 @@ public String delete_B() throws Exception { List instructions = new LinkedList(); instructions.add(new RemoveNodeInstructionImpl("/a", "b")); - Commit commit = new CommitImpl("This is a commit with deleted /a/b", "/a", "-b", instructions); + Commit commit = new CommitImpl("/a", "-b", "This is a commit with deleted /a/b", + instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); return command.execute(); } @@ -137,7 +140,7 @@ instructions.add(new AddPropertyInstructionImpl("/a/b/e", "array", new Object[] { 123, null, 123.456D, "for:bar", Boolean.TRUE })); - Commit commit = new CommitImpl("This is a commit with updated /a and added /a/d and /a/b/e", "", "TODO", + Commit commit = new CommitImpl("", "TODO", "This is a commit with updated /a and added /a/d and /a/b/e", instructions); CommitCommandMongo command = new CommitCommandMongo(mongoConnection, commit); String revisionId = command.execute();