Merge "Remove declarations of unthrown OrmException"
This commit is contained in:
@@ -656,11 +656,11 @@ public class ChangeJson {
|
||||
return result;
|
||||
}
|
||||
|
||||
private boolean submittable(ChangeData cd) throws OrmException {
|
||||
private boolean submittable(ChangeData cd) {
|
||||
return SubmitRecord.findOkRecord(cd.submitRecords(SUBMIT_RULE_OPTIONS_STRICT)).isPresent();
|
||||
}
|
||||
|
||||
private List<SubmitRecord> submitRecords(ChangeData cd) throws OrmException {
|
||||
private List<SubmitRecord> submitRecords(ChangeData cd) {
|
||||
return cd.submitRecords(SUBMIT_RULE_OPTIONS_LENIENT);
|
||||
}
|
||||
|
||||
@@ -712,7 +712,7 @@ public class ChangeJson {
|
||||
}
|
||||
|
||||
private Map<String, LabelWithStatus> initLabels(
|
||||
ChangeData cd, LabelTypes labelTypes, boolean standard) throws OrmException {
|
||||
ChangeData cd, LabelTypes labelTypes, boolean standard) {
|
||||
Map<String, LabelWithStatus> labels = new TreeMap<>(labelTypes.nameComparator());
|
||||
for (SubmitRecord rec : submitRecords(cd)) {
|
||||
if (rec.labels == null) {
|
||||
|
||||
@@ -328,8 +328,7 @@ public class MergeOp implements AutoCloseable {
|
||||
return allowClosed ? SUBMIT_RULE_OPTIONS_ALLOW_CLOSED : SUBMIT_RULE_OPTIONS;
|
||||
}
|
||||
|
||||
private static List<SubmitRecord> getSubmitRecords(ChangeData cd, boolean allowClosed)
|
||||
throws OrmException {
|
||||
private static List<SubmitRecord> getSubmitRecords(ChangeData cd, boolean allowClosed) {
|
||||
return cd.submitRecords(submitRuleOptions(allowClosed));
|
||||
}
|
||||
|
||||
@@ -393,7 +392,7 @@ public class MergeOp implements AutoCloseable {
|
||||
commitStatus.maybeFailVerbose();
|
||||
}
|
||||
|
||||
private void bypassSubmitRules(ChangeSet cs, boolean allowClosed) throws OrmException {
|
||||
private void bypassSubmitRules(ChangeSet cs, boolean allowClosed) {
|
||||
checkArgument(
|
||||
!cs.furtherHiddenChanges(), "cannot bypass submit rules for topic with hidden change");
|
||||
for (ChangeData cd : cs.changes()) {
|
||||
@@ -834,7 +833,7 @@ public class MergeOp implements AutoCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
private SubmitType getSubmitType(ChangeData cd) throws OrmException {
|
||||
private SubmitType getSubmitType(ChangeData cd) {
|
||||
SubmitTypeRecord str = cd.submitTypeRecord();
|
||||
return str.isOk() ? str.type : null;
|
||||
}
|
||||
|
||||
@@ -729,8 +729,7 @@ public class ChangeField {
|
||||
return Lists.transform(records, r -> GSON.toJson(new StoredSubmitRecord(r)).getBytes(UTF_8));
|
||||
}
|
||||
|
||||
private static Iterable<byte[]> storedSubmitRecords(ChangeData cd, SubmitRuleOptions opts)
|
||||
throws OrmException {
|
||||
private static Iterable<byte[]> storedSubmitRecords(ChangeData cd, SubmitRuleOptions opts) {
|
||||
return storedSubmitRecords(cd.submitRecords(opts));
|
||||
}
|
||||
|
||||
|
||||
@@ -905,7 +905,7 @@ public class ChangeData {
|
||||
return messages;
|
||||
}
|
||||
|
||||
public List<SubmitRecord> submitRecords(SubmitRuleOptions options) throws OrmException {
|
||||
public List<SubmitRecord> submitRecords(SubmitRuleOptions options) {
|
||||
List<SubmitRecord> records = submitRecords.get(options);
|
||||
if (records == null) {
|
||||
if (!lazyLoad) {
|
||||
@@ -926,7 +926,7 @@ public class ChangeData {
|
||||
submitRecords.put(options, records);
|
||||
}
|
||||
|
||||
public SubmitTypeRecord submitTypeRecord() throws OrmException {
|
||||
public SubmitTypeRecord submitTypeRecord() {
|
||||
if (submitTypeRecord == null) {
|
||||
submitTypeRecord = submitRuleEvaluatorFactory.create(this).getSubmitType();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user