From 6e7f82fa955f7d696861854f36d160bcdb56a8b8 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Wed, 30 Aug 2023 11:51:06 +0200 Subject: [PATCH] Fix java 8 build --- example/pom.xml | 2 +- .../src/main/java/it/tdlight/client/SimpleTelegramClient.java | 2 +- .../src/main/java/it/tdlight/client/TemporaryMessageURL.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/pom.xml b/example/pom.xml index 34ffd09..e375845 100644 --- a/example/pom.xml +++ b/example/pom.xml @@ -26,7 +26,7 @@ it.tdlight tdlight-java-bom - 3.0.12+td.1.8.14 + 3.1.0+td.1.8.16 pom import diff --git a/tdlight-java/src/main/java/it/tdlight/client/SimpleTelegramClient.java b/tdlight-java/src/main/java/it/tdlight/client/SimpleTelegramClient.java index 41f359f..3e64a6c 100644 --- a/tdlight-java/src/main/java/it/tdlight/client/SimpleTelegramClient.java +++ b/tdlight-java/src/main/java/it/tdlight/client/SimpleTelegramClient.java @@ -122,7 +122,7 @@ public final class SimpleTelegramClient implements Authenticable, MutableTelegra this.addUpdateHandler(TdApi.UpdateAuthorizationState.class, this.meGetter = new AuthorizationStateReadyGetMe(client, mainChatsLoader, archivedChatsLoader)); this.addUpdateHandler(TdApi.UpdateNewMessage.class, new CommandsHandler(client, this.commandHandlers, this::getMe)); - var temporaryMessageHandler = new TemporaryMessageHandler(this.temporaryMessages); + TemporaryMessageHandler temporaryMessageHandler = new TemporaryMessageHandler(this.temporaryMessages); this.addUpdateHandler(TdApi.UpdateMessageSendSucceeded.class, temporaryMessageHandler); this.addUpdateHandler(TdApi.UpdateMessageSendFailed.class, temporaryMessageHandler); this.authenticationData = authenticationData; diff --git a/tdlight-java/src/main/java/it/tdlight/client/TemporaryMessageURL.java b/tdlight-java/src/main/java/it/tdlight/client/TemporaryMessageURL.java index 857e3a6..ee3a465 100644 --- a/tdlight-java/src/main/java/it/tdlight/client/TemporaryMessageURL.java +++ b/tdlight-java/src/main/java/it/tdlight/client/TemporaryMessageURL.java @@ -28,7 +28,7 @@ final class TemporaryMessageURL { if (obj == null || obj.getClass() != this.getClass()) { return false; } - var that = (TemporaryMessageURL) obj; + TemporaryMessageURL that = (TemporaryMessageURL) obj; return this.chatId == that.chatId && this.messageId == that.messageId; }