Skip to content

Commit e40d356

Browse files
committed
implement Closeable instead of AutoCloseable so minSdkVersion can remain at 15
1 parent 0a29715 commit e40d356

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/AndroidClient/android/src/main/java/net/servicestack/client/sse/ServerEventsClient.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import net.servicestack.func.Function;
1313

1414
import java.io.BufferedInputStream;
15+
import java.io.Closeable;
1516
import java.io.FileNotFoundException;
1617
import java.io.IOException;
1718
import java.io.InputStream;
@@ -38,7 +39,7 @@
3839
* Created by mythz on 2/9/2017.
3940
*/
4041

41-
public class ServerEventsClient implements AutoCloseable {
42+
public class ServerEventsClient implements Closeable {
4243
private String baseUri;
4344
private String[] channels;
4445
private String eventStreamPath;
@@ -535,7 +536,7 @@ private void processOnHeartbeatMessage(ServerEventMessage e) {
535536
}
536537

537538
@Override
538-
public void close() throws Exception {
539+
public void close() {
539540
stop();
540541
}
541542

src/AndroidClient/client/src/main/java/net/servicestack/client/sse/ServerEventsClient.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import net.servicestack.func.Function;
1313

1414
import java.io.BufferedInputStream;
15+
import java.io.Closeable;
1516
import java.io.FileNotFoundException;
1617
import java.io.IOException;
1718
import java.io.InputStream;
@@ -38,7 +39,7 @@
3839
* Created by mythz on 2/9/2017.
3940
*/
4041

41-
public class ServerEventsClient implements AutoCloseable {
42+
public class ServerEventsClient implements Closeable {
4243
private String baseUri;
4344
private String[] channels;
4445
private String eventStreamPath;
@@ -535,7 +536,7 @@ private void processOnHeartbeatMessage(ServerEventMessage e) {
535536
}
536537

537538
@Override
538-
public void close() throws Exception {
539+
public void close() {
539540
stop();
540541
}
541542

0 commit comments

Comments
 (0)