ipfs-shipyard / java-ipfs-http-client

A Java implementation of the HTTP IPFS API
MIT License
538 stars 243 forks source link

IPFS pin update returns a wrong type #166

Closed odisseus closed 1 year ago

odisseus commented 4 years ago

The HTTP endpoint for updating pins returns a list of affected pin hashes. This is true for both versions 0.4.x and 0.5.x (I have actually checked versions 0.4.23 and 0.5.1).

However, the return type of the method io.ipfs.api.IPFS.Pin#update is a List<MultiAddress> instead of List<Multihash>.

kevodwyer commented 1 year ago

Are you able to point me to the documentation that specifies List < MultiAddress > ? I found https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/PIN.md, but that doesn't mention pin.update

odisseus commented 1 year ago

My point was that the Java wrapper attempts to cast the actual result into a wrong type. It should have been a list of hashes, but the java method used to return a List<MultiAddress>.

Looks like this bug has been fixed in the commit 710c4edcd521d550e385c9ae51aa9a9da4b56aac.