[Rxtx] NRJavaSerial, a fork of rxtx that fixes the papercuts!
Steffen.DETTMER at ingenico.com
Tue Mar 29 03:34:31 MDT 2011
> On Behalf Of Brian Schlining
> Here's one reasonable reason: Some users will modify the set
> and act surprised when it's modifying the original underlying set.
In Java, which lacks "const" and in almost any case works with
IMHO this would be a strange assumption...
If someone gets a reference to the list of known/supported/autodetected
port names and adds a port name, why should she expect that this has no
Especially if there is not setPorts() method.
I also think, as probably the Author of the original code, being too
strict can be very uncomfortable: you might end up with writing heaps of
wrappers for many functions only because access to something isn't
possible. And surely someone will call this bloat-instead-of-KISS a
I wonder why but in Javaworld it seems to be so common to discuss such
theoretical things and "extends is evil" and fire around with so-called
patterns like "Dependency injection", but I think it is all about to do
what is best for a /particular case/. If in doubt, I think simplicity is
a good guide. anyway. A long, difficult and different topic.
More information about the Rxtx