steveohara / j2mod

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

Code requires guards around a number of the functions #22

Closed djbr-david closed 8 years ago

djbr-david commented 8 years ago

Functions such as setParity in the SerialParameters class require a guard against a Null Pointer Exception.

steveohara commented 8 years ago

I have added checking where an NPE might occur and created a snapshot. Could you try it and confirm all is now fixed?

https://oss.sonatype.org/content/repositories/snapshots/com/ghgande/j2mod/2.1.3-SNAPSHOT/j2mod-2.1.3-20160630.162817-2.jar

djbr-david commented 8 years ago

Checked the code in our app and its all working as far as we are concerned. Thanks for your help.....