RFR: 215: Verify webrev links before considering publication successful
Robin Westberg
rwestberg at openjdk.java.net
Mon Jan 13 08:32:07 UTC 2020
On Mon, 13 Jan 2020 07:41:24 GMT, Erik Helin <ehelin at openjdk.org> wrote:
>> Hi all,
>>
>> Please review this change which ensures that webrev links can be successfully reached before returning from the publication step.
>>
>> Best regards,
>> Robin
>
> bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/WebrevStorage.java line 162:
>
>> 161: var response = client.send(request, HttpResponse.BodyHandlers.ofString());
>> 162: if (response.statusCode() < 400) {
>> 163: // Success!
>
> Suggestion:
>
> if (respons.statusCode() >= 200 && response.statusCode() < 400) {
I don't think < 200's propagate outside of the http client implementation, so should be reasonably safe.
-------------
PR: https://git.openjdk.java.net/skara/pull/345
More information about the skara-dev
mailing list