Add compatibility with java7

Merge #21
This commit is contained in:
Rubenlagus 2016-04-17 17:10:09 +02:00
parent a84f073a0a
commit 1c66511bff

View File

@ -781,7 +781,9 @@ public abstract class AbsSender {
// Simplified methods
private void sendApiMethodAsync(BotApiMethod method, SentCallback callback) {
exe.submit(() -> {
exe.submit(new Runnable() {
@Override
public void run() {
try {
CloseableHttpClient httpclient = HttpClientBuilder.create().setSSLHostnameVerifier(new NoopHostnameVerifier()).build();
String url = getBaseUrl() + method.getPath();
@ -801,6 +803,8 @@ public abstract class AbsSender {
} catch (IOException e) {
callback.onException(method, e);
}
}
});
}