RFR: 1407: GitLabMergeRequest#filesUrl returns wrong result
Erik Joelsson
erikj at openjdk.java.net
Mon Apr 25 13:35:39 UTC 2022
On Mon, 25 Apr 2022 13:22:59 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> forge/src/main/java/org/openjdk/skara/forge/gitlab/GitLabMergeRequest.java line 846:
>>
>>> 844: var versionId = request.get("versions").execute().stream()
>>> 845: .filter(version -> hash.hex().equals(version.get("head_commit_sha").asString()))
>>> 846: .map(version -> String.valueOf(version.get("id").asInt()))
>>
>> I don't think we need to convert this to an int to then just create a string again.
>
> The `id` field of a `version` is a int type in the json so that `version.get("id").asString()` will throw a exception.
Oh ok, didn't know the parser was that picky.
-------------
PR: https://git.openjdk.java.net/skara/pull/1304
More information about the skara-dev
mailing list