gitlab4j-api icon indicating copy to clipboard operation
gitlab4j-api copied to clipboard

protectBranch use Integer for userId but the Class AbstractUser use Long for Id

Open rfrebyLF opened this issue 3 years ago • 2 comments
trafficstars

Hello,

After updating to the latest version of the API, we ran into an issue of using the method ProtectBranch. We use it with a getId() of a User in our tests.

The ID used in the Class AbstractUser is now a Long, but the definition of the method protectBranch of ProtectedBranchApi use an Integer: https://javadoc.io/static/org.gitlab4j/gitlab4j-api/5.0.1/org/gitlab4j/api/ProtectedBranchesApi.html#protectBranch(java.lang.Object,java.lang.String,java.lang.Integer,java.lang.Integer,java.lang.Integer,java.lang.Boolean)

Is this just something that didn't get updated by accident?

Thanks in advance!

rfrebyLF avatar Oct 20 '22 15:10 rfrebyLF

IMO all user id types should be Long and not Integer

You can file a Pull Request for that (maybe keep the method with the Integer type and mark it as deprecated in order to not break backward compatibility)

jmini avatar Apr 13 '23 13:04 jmini

Hi @jmini, shall I take care of the above issue? I would like to work on it.

ved-asole avatar Oct 07 '23 13:10 ved-asole