nyholku/purejavacomm — pull request #3 by timcu (2011-11-08 06:19:36+00:00)
Title: Include device directory path in port name returned by getPortList()

Include device directory path in port name, so that name returned in getPortList can actually be used to select port. For example on Mac, JTermiosImpl.getPortList() and consequently CommPortIdentifier.getPortIdentifiers().nextElement().getName() currently returns

cu.Bluetooth-PDA-Sync
cu.Bluetooth-Modem
cu.PL2303-001013FD

However, to use the serial port, I need to use CommPortIdentifier.getPortIdentifier("/dev/cu.PL2303-001013FD"). This change for Mac and Linux means that I can use the name returned by the port identifier to get the port identifier. I presume it already works for Windows. In the example above, JTermiosImpl.getPortList() will now return

/dev/cu.Bluetooth-PDA-Sync
/dev/cu.Bluetooth-Modem
/dev/cu.PL2303-001013FD