gary-rowe / hid4java

A cross-platform Java Native Access (JNA) wrapper for the libusb/hidapi library. Works out of the box on Windows/Mac/Linux.
MIT License
229 stars 71 forks source link

Minor bug found #23

Closed lorenberg closed 9 years ago

lorenberg commented 9 years ago

Hello Gary,

I must tell you I am really enjoying your library, it is working really fine :)

I just wanted to inform you that I found a minor bug in your code....nothing serious and easy to fix ;)

In class HidDevice.java, on line 66, you have a method called

public String getId()

which should return a string made of vid + pid + serial_number.

Well, the current code was returning the path :)

I fixed it in my code, I thought you would have liked to know it ;)

Best and once again thank you for your work.

Lorenzo

gary-rowe commented 9 years ago

Thanks for the feedback @lorenberg. In early versions of hid4java the Id was made up of a structure as you suggested, however discussions from #8 showed that path was a better supported unique identifier across all platforms.

Given that this has been addressed I'll close this issue, but if you find anything else please do report it.