steveohara / j2mod

Enhanced Modbus library implemented in the Java programming language
Apache License 2.0
275 stars 110 forks source link

Add user input validation on SerialParameters.java. #141

Closed AmbroiseS closed 1 year ago

AmbroiseS commented 1 year ago

To avoid losing time on a typo like I did. For example, invalid encoding silently defaults to ascii.

It will now throw an exception if the parameter is not recognised.

Probaly need to validate for other classes than Serial