Do not print stack trace if sleep is interrupted

This commit is contained in:
hedgecrw85 2018-08-02 09:38:49 -05:00
parent 54fba1c9f4
commit e211b685f2
6 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,7 @@ apply plugin: 'osgi'
group = 'com.fazecast'
archivesBaseName = 'jSerialComm'
version = '2.1.0'
version = '2.1.1'
ext.moduleName = 'com.fazecast.jSerialComm'
assert hasProperty('java6Home'): "Set the property 'java6Home' in your gradle.properties file pointing to a Java 6 JDK installation"

View File

@ -42,7 +42,7 @@ import java.util.Date;
* This class provides native access to serial ports and devices without requiring external libraries or tools.
*
* @author Will Hedgecock <will.hedgecock@fazecast.com>
* @version 2.1.0
* @version 2.1.1
* @see java.io.InputStream
* @see java.io.OutputStream
*/
@ -416,7 +416,7 @@ public final class SerialPort
// Force a sleep to ensure that the port does not become unusable due to rapid closing/opening on the part of the user
if (safetySleepTime > 0)
try { Thread.sleep(safetySleepTime); } catch (Exception e) { e.printStackTrace(); }
try { Thread.sleep(safetySleepTime); } catch (Exception e) {}
// If this is an Android root application, we must explicitly allow serial port access to the library
if (isAndroid)

View File

@ -31,7 +31,7 @@ import java.util.EventListener;
* This interface must be implemented to enable simple event-based serial port I/O.
*
* @author Will Hedgecock <will.hedgecock@fazecast.com>
* @version 2.1.0
* @version 2.1.1
* @see java.util.EventListener
*/
public interface SerialPortDataListener extends EventListener

View File

@ -31,7 +31,7 @@ import java.util.EventObject;
* This class describes an asynchronous serial port event.
*
* @author Will Hedgecock <will.hedgecock@fazecast.com>
* @version 2.1.0
* @version 2.1.1
* @see java.util.EventObject
*/
public final class SerialPortEvent extends EventObject

View File

@ -31,7 +31,7 @@ package com.fazecast.jSerialComm;
* <i>Note</i>: Using this interface will negate any serial port read timeout settings since they make no sense in an asynchronous context.
*
* @author Will Hedgecock &lt;will.hedgecock@fazecast.com&gt;
* @version 2.1.0
* @version 2.1.1
* @see com.fazecast.jSerialComm.SerialPortDataListener
* @see java.util.EventListener
*/

View File

@ -32,7 +32,7 @@ import java.util.Scanner;
* This class provides a test case for the jSerialComm library.
*
* @author Will Hedgecock &lt;will.hedgecock@gmail.com&gt;
* @version 2.1.0
* @version 2.1.1
* @see java.io.InputStream
* @see java.io.OutputStream
*/