Commit e65bcefa by aquilescanta Committed by bachinger

Reorder DataSourceException constructors and accept nullable parameters

This CL doesn't introduce functional changes.

PiperOrigin-RevId: 387613057
parent 337d5aa9
......@@ -70,26 +70,24 @@ public class DataSourceException extends IOException {
/**
* Constructs a DataSourceException.
*
* @param message The error message.
* @param cause The error cause.
* @param reason Reason of the error, should be one of the {@code ERROR_CODE_IO_*} in {@link
* PlaybackException.ErrorCode}.
*/
public DataSourceException(
String message, @Nullable Throwable cause, @PlaybackException.ErrorCode int reason) {
super(message, cause);
public DataSourceException(@Nullable Throwable cause, @PlaybackException.ErrorCode int reason) {
super(cause);
this.reason = reason;
}
/**
* Constructs a DataSourceException.
*
* @param cause The error cause.
* @param message The error message.
* @param reason Reason of the error, should be one of the {@code ERROR_CODE_IO_*} in {@link
* PlaybackException.ErrorCode}.
*/
public DataSourceException(Throwable cause, @PlaybackException.ErrorCode int reason) {
super(cause);
public DataSourceException(@Nullable String message, @PlaybackException.ErrorCode int reason) {
super(message);
this.reason = reason;
}
......@@ -97,11 +95,15 @@ public class DataSourceException extends IOException {
* Constructs a DataSourceException.
*
* @param message The error message.
* @param cause The error cause.
* @param reason Reason of the error, should be one of the {@code ERROR_CODE_IO_*} in {@link
* PlaybackException.ErrorCode}.
*/
public DataSourceException(String message, @PlaybackException.ErrorCode int reason) {
super(message);
public DataSourceException(
@Nullable String message,
@Nullable Throwable cause,
@PlaybackException.ErrorCode int reason) {
super(message, cause);
this.reason = reason;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment