[Rxtx] NRJavaSerial, a fork of rxtx that fixes the papercuts!
Kevin Harrington NR
kharrington at neuronrobotics.com
Mon Mar 28 12:57:42 MDT 2011
>Either way, the code as it stands now is buggy because the client could
modify your Set.
Well the Set<> was left modifiable by intention. If a user wanted to
artificially add an option to the list (maybe to add in linux the
/dev/serial/by-id/* dev nodes which are not mapped normally) then they are
free to do that in user land for their application without having to create
a new object. Likewise, if they added the /dev/serial/by-id/ node for a
port, they would need to remove the duplicate that exists in the Set. I see
no reasonable reason to remove this option from the user, mostly because
having the option adds to the usability and does not detract from it. I
would say that maybe the documentation has a bug by not stating that
possible use case, but think it is unfair to label the code as buggy. As i
stated before, the goal is to make the library more friendly to the end
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rxtx