Skip to content

Commit

Permalink
Remove unused exception constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgecrw committed Jun 13, 2022
1 parent bf6a0aa commit 0958540
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 73 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/fazecast/jSerialComm/SerialPort.java
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ public final synchronized boolean setParity(int newParity)
* @param delayAfterSendMicroseconds The time to wait after sending the last data bit before disabling transmit mode (effective only on Linux).
* @return Whether the port configuration is valid or disallowed on this system (only meaningful after the port is already opened).
*/
public final synchronized boolean setRs485ModeParameters(boolean useRS485Mode, boolean rs485RtsActiveHigh, int delayBeforeSendMicroseconds, int delayAfterSendMicroseconds)
public final boolean setRs485ModeParameters(boolean useRS485Mode, boolean rs485RtsActiveHigh, int delayBeforeSendMicroseconds, int delayAfterSendMicroseconds)
{
return setRs485ModeParameters(useRS485Mode, rs485RtsActiveHigh, false, false, delayBeforeSendMicroseconds, delayAfterSendMicroseconds);
}
Expand Down
33 changes: 0 additions & 33 deletions src/main/java/com/fazecast/jSerialComm/SerialPortIOException.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ public final class SerialPortIOException extends IOException
{
private static final long serialVersionUID = 3353684802475494674L;

/**
* Constructs a {@link SerialPortIOException} with {@code null} as its error detail message.
*/
public SerialPortIOException()
{
super();
}

/**
* Constructs a {@link SerialPortIOException} with the specified detail message.
*
Expand All @@ -53,29 +45,4 @@ public SerialPortIOException(String message)
{
super(message);
}

/**
* Constructs a {@link SerialPortIOException} with the specified detail message and cause.
* <p>
* Note that the detail message associated with {@link cause} is <i>not</i> automatically incorporated into this exception's detail message.
*
* @param message message The detail message (which is saved for later retrieval by the {@link getMessage()} method).
* @param cause The cause (which is saved for later retrieval by the {@link getCause()} method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
*/
public SerialPortIOException(String message, Throwable cause)
{
super(message, cause);
}

/**
* Constructs a {@link SerialPortIOException} with the specified cause and a detail message of {@code (cause==null ? null : cause.toString()) }
* (which typically contains the class and detail message of {@code cause}). This constructor is useful for IO exceptions that are little more
* than wrappers for other throwables.
*
* @param cause The cause (which is saved for later retrieval by the {@link getCause()} method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
*/
public SerialPortIOException(Throwable cause)
{
super(cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,6 @@ public final class SerialPortInvalidPortException extends RuntimeException
{
private static final long serialVersionUID = 3420177672598538224L;

/**
* Constructs a {@link SerialPortInvalidPortException} with {@code null} as its error detail message.
*/
public SerialPortInvalidPortException()
{
super();
}

/**
* Constructs a {@link SerialPortInvalidPortException} with the specified detail message.
*
* @param message The detail message (which is saved for later retrieval by the {@link getMessage()} method).
*/
public SerialPortInvalidPortException(String message)
{
super(message);
}

/**
* Constructs a {@link SerialPortInvalidPortException} with the specified detail message and cause.
* <p>
Expand All @@ -64,16 +46,4 @@ public SerialPortInvalidPortException(String message, Throwable cause)
{
super(message, cause);
}

/**
* Constructs a {@link SerialPortInvalidPortException} with the specified cause and a detail message of {@code (cause==null ? null : cause.toString()) }
* (which typically contains the class and detail message of {@code cause}). This constructor is useful for exceptions that are little more
* than wrappers for other throwables.
*
* @param cause The cause (which is saved for later retrieval by the {@link getCause()} method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
*/
public SerialPortInvalidPortException(Throwable cause)
{
super(cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ public final class SerialPortTimeoutException extends InterruptedIOException
{
private static final long serialVersionUID = 3209035213903386044L;

/**
* Constructs a {@link SerialPortTimeoutException} with {@code null} as its error detail message.
*/
public SerialPortTimeoutException()
{
super();
bytesTransferred = 0;
}

/**
* Constructs a {@link SerialPortTimeoutException} with the specified detail message.
*
Expand Down

0 comments on commit 0958540

Please sign in to comment.