jdog456 / java-simple-serial-connector

Automatically exported from code.google.com/p/java-simple-serial-connector
0 stars 0 forks source link

JVM crashed on open port with NULL name #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
SerialPort serialPort = new SerialPort(null);
serialPort.openPort();
// crashed here

Expected result: NullPointerExcepion

Original issue reported on code.google.com by VolkVolk...@gmail.com on 14 Nov 2012 at 6:29

GoogleCodeExporter commented 8 years ago
Fixed in 2.1.0

If you create an SerialPort object with null port name parameter, you'll 
receive this exception while port opening:
jssc.SerialPortException: Port name - null; Method name - openPort(); Exception 
type - Port not found.

I can't throw an exception from the constructor in cause of back compatibility.

Original comment by scream3r.org@gmail.com on 12 Mar 2013 at 10:05