Remove project state check from ChangeControl#addPatchSet
All callers are already explicitly checking for the project state so
there is no need to perform the check implicitly once more.
Change-Id: I956eddb1647778454293a47bfee5459952783b17
diff --git a/java/com/google/gerrit/server/project/ChangeControl.java b/java/com/google/gerrit/server/project/ChangeControl.java
index 8cd12f8..10c04af 100644
--- a/java/com/google/gerrit/server/project/ChangeControl.java
+++ b/java/com/google/gerrit/server/project/ChangeControl.java
@@ -176,9 +176,7 @@
/** Can this user add a patch set to this change? */
private boolean canAddPatchSet(ReviewDb db) throws OrmException {
- if (!(refControl.asForRef().testOrFalse(RefPermission.CREATE_CHANGE)
- && getProjectControl().getProjectState().statePermitsWrite())
- || isPatchSetLocked(db)) {
+ if (!(refControl.asForRef().testOrFalse(RefPermission.CREATE_CHANGE)) || isPatchSetLocked(db)) {
return false;
}
if (isOwner()) {