BenLenest / java-simple-serial-connector

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

SerialPortList.getPortNames() with no ports on system crashes, returns 1 #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If I call getPortNames() with no com ports currently created (a common 
situation, where someone forgets to plug in the USB adapter)

the line 

String[] comList = SerialPortList.getPortNames();

forces my NetBeans Platform to close, returning '1'.

Perhaps this isn't quite an issue, but I'm really not sure what it would be 
returning if the list is empty;  it apparently is not a String[].

Original issue reported on code.google.com by derekcro...@gmail.com on 17 Nov 2011 at 6:25

GoogleCodeExporter commented 8 years ago
I know about getPortNames() problem on some Linux distribs. I have fixed this 
issue in Test Build #4, and I recommend you to try it. If you have no serial 
ports in your system you will receive a String[] will zero length.

If you use jSSC-0.7.1 I recommend you to use 0.8 branch.

Original comment by scream3r.org@gmail.com on 21 Nov 2011 at 1:44

GoogleCodeExporter commented 8 years ago
Thank you scream3r.  I'm very happy with jSSC.

Original comment by derekcro...@gmail.com on 21 Nov 2011 at 2:00

GoogleCodeExporter commented 8 years ago
Oh! I apologize.  I was not thinking.  I am running Win7 64 bit, not Linux.

Original comment by derekcro...@gmail.com on 21 Nov 2011 at 4:43

GoogleCodeExporter commented 8 years ago
In Windows all must work fine. Can you send me a code where you have an error.

Original comment by scream3r.org@gmail.com on 21 Nov 2011 at 7:08

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
This is under 0.7.1.  testing under 0.8 reveals that the problem is gone.

I apologize for the trouble.  Issue closed.

Original comment by derekcro...@gmail.com on 22 Nov 2011 at 3:57

GoogleCodeExporter commented 8 years ago
Ok

Original comment by scream3r.org@gmail.com on 22 Nov 2011 at 5:31

GoogleCodeExporter commented 8 years ago

Original comment by scream3r.org@gmail.com on 22 Nov 2011 at 5:32