commit | a6f3272a1c43bbd5d45aa2535ed53b8ae4632e50 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Fri May 26 13:44:34 2017 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Fri May 26 13:46:02 2017 +0100 |
tree | e1e39ddc4f2cb245a6111f2c59020be6448804f1 | |
parent | 16412dd425b87961616b8bc4c10483168c2cdd7d [diff] |
Simplify condition on new patch-sets Small refactoring to make the condition on new patch-sets created simpler and more readable. Change-Id: I2fd70eb988217cab70296a4d957aec71a0ee88cd
diff --git a/src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java b/src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java index 21bf51d..5b222cd 100644 --- a/src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java +++ b/src/main/java/com/criteo/gerrit/plugins/automerge/AutomaticMerger.java
@@ -109,10 +109,9 @@ private void onPatchSetCreated(final PatchSetCreatedEvent event) { ChangeAttribute change = event.change.get(); - if (!atomicityHelper.isAtomicReview(change)) { - return; + if (atomicityHelper.isAtomicReview(change)) { + processNewAtomicPatchSet(change); } - processNewAtomicPatchSet(change); } private void onCommendAdded(final CommentAddedEvent newComment) {