CommitValidators: Avoid IOBE when no Change-Id footer is present
Change-Id: Id766ddb3fe87a3a828a4a9d92ae1ebc26323cf51
This commit is contained in:
@@ -245,7 +245,7 @@ public class CommitValidators {
|
|||||||
String errMsg = String.format(
|
String errMsg = String.format(
|
||||||
MULTIPLE_CHANGE_ID_MSG, sha1);
|
MULTIPLE_CHANGE_ID_MSG, sha1);
|
||||||
throw new CommitValidationException(errMsg, messages);
|
throw new CommitValidationException(errMsg, messages);
|
||||||
}
|
} else {
|
||||||
String v = idList.get(idList.size() - 1).trim();
|
String v = idList.get(idList.size() - 1).trim();
|
||||||
if (!CHANGE_ID.matcher(v).matches()) {
|
if (!CHANGE_ID.matcher(v).matches()) {
|
||||||
String errMsg = String.format(INVALID_CHANGE_ID_MSG, sha1);
|
String errMsg = String.format(INVALID_CHANGE_ID_MSG, sha1);
|
||||||
@@ -253,6 +253,7 @@ public class CommitValidators {
|
|||||||
getMissingChangeIdErrorMsg(errMsg, receiveEvent.commit));
|
getMissingChangeIdErrorMsg(errMsg, receiveEvent.commit));
|
||||||
throw new CommitValidationException(errMsg, messages);
|
throw new CommitValidationException(errMsg, messages);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user