Merge branch 'stable-3.2'
* stable-3.2: maven_jar: Remove unused unsign attribute Handle duplicate label values on project load and push of config updates Patch: Restore the forCode method MergeOp: Update comment reference to IntegrationException Update buildifier version to 3.2.1 Change-Id: I2c49587f8e6ecebd3f9c7d48542651ea043335cb
This commit is contained in:
@@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkArgument;
|
||||
import com.google.auto.value.AutoValue;
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.common.primitives.Ints;
|
||||
import com.google.gerrit.common.UsedAt;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -107,6 +108,16 @@ public final class Patch {
|
||||
public char getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@UsedAt(UsedAt.Project.COLLABNET)
|
||||
public static ChangeType forCode(char c) {
|
||||
for (ChangeType s : ChangeType.values()) {
|
||||
if (s.code == c) {
|
||||
return s;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** Type of formatting for this patch. */
|
||||
|
||||
@@ -635,13 +635,13 @@ public class MergeOp implements AutoCloseable {
|
||||
throw e;
|
||||
}
|
||||
|
||||
// BatchUpdate may have inadvertently wrapped an IntegrationException
|
||||
// BatchUpdate may have inadvertently wrapped an IntegrationConflictException
|
||||
// thrown by some legacy SubmitStrategyOp code that intended the error
|
||||
// message to be user-visible. Copy the message from the wrapped
|
||||
// exception.
|
||||
//
|
||||
// If you happen across one of these, the correct fix is to convert the
|
||||
// inner IntegrationException to a ResourceConflictException.
|
||||
// inner IntegrationConflictException to a ResourceConflictException.
|
||||
if (e.getCause() instanceof IntegrationConflictException) {
|
||||
throw (IntegrationConflictException) e.getCause();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user