| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Lazy-initialize SerialPort in transport classes (#145) Defer SerialPort.getCommPort() from the constructor to connect/bind time in both SerialPortClientTransport and SerialPortServerTransport using double-checked locking. This allows getCommPort failures (which throw immediately on Linux/macOS for non-existent ports) to be caught and wrapped as ModbusConnectException, giving callers consistent error handling across all platforms. Also replace generic Exception usage with ModbusException and ModbusConnectException where appropriate. Add SerialPortGetCommPortBehaviorTest with OS-gated tests documenting the platform-specific getCommPort behavior and verifying that both transport classes handle bogus port names correctly. Expand CI matrix to build and test on Ubuntu, macOS, and Windows. | 5 个月前 |