summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Kempin <edwin.kempin@sap.com>2012-05-10 20:00:51 +0200
committerEdwin Kempin <edwin.kempin@sap.com>2012-05-10 20:16:22 +0200
commiteb9554f785565553daf63a8b58d612db4789f187 (patch)
tree6b0e54f6fa1541ffa7c082be042c542bc099e25a
parent189282bac993b5c9b5e63ead0bf3aa74eaaa5856 (diff)
Fix merging of access sections
If the same access section is specified multiple times when editing the access rights, they need to be merged on save. The merging was done incorrectly so that null was added as permission. This caused a NullPointerException and the save of the access rights failed. Change-Id: Ia70c2199fa6c07799ebb325e3391818956248e72 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
-rw-r--r--gerrit-common/src/main/java/com/google/gerrit/common/data/AccessSection.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/AccessSection.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/AccessSection.java
index 12e504c512..def174ffcd 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/AccessSection.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/data/AccessSection.java
@@ -119,7 +119,7 @@ public class AccessSection implements Comparable<AccessSection> {
if (dst != null) {
dst.mergeFrom(src);
} else {
- permissions.add(dst);
+ permissions.add(src);
}
}
}