From 83a7e0cad01230a2cd302189b7c25817e8bfca0e Mon Sep 17 00:00:00 2001 From: Johan Vos Date: Sun, 5 Sep 2021 14:50:37 +0200 Subject: [PATCH 1/2] make this compile with Java 11 --- java/pom.xml | 142 ++++++++++++++++++ .../api/crypto/SignalServiceCipher.java | 2 +- .../crypto/ContactDiscoveryCipher.java | 8 +- 3 files changed, 145 insertions(+), 7 deletions(-) create mode 100755 java/pom.xml diff --git a/java/pom.xml b/java/pom.xml new file mode 100755 index 0000000000..b456a07825 --- /dev/null +++ b/java/pom.xml @@ -0,0 +1,142 @@ + + + 4.0.0 + + org.whispersystems + signal-service-java + 2.15.4-SNAPSHOT + jar + + webscheduler + + + UTF-8 + 11 + + + + + Gluon + https://nexus.gluonhq.com/nexus/content/repositories/releases + + + + + + org.whispersystems + signal-client-java + 0.8.4 + + + com.googlecode.libphonenumber + libphonenumber + 8.10.7 + + + org.whispersystems + curve25519-java + 0.5.0 + + + org.signal + signal-metadata-java + 0.1.2 + + + com.squareup.okhttp3 + okhttp + 3.12.1 + + + com.fasterxml.jackson.core + jackson-databind + 2.10.0 + + + com.google.protobuf + protobuf-java + 3.4.0 + + + junit + junit + 3.8.2 + test + + + org.assertj + assertj-core + 1.7.1 + test + + + org.conscrypt + conscrypt-openjdk-uber + 2.0.0 + test + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.7 + + false + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9 + + false + + + + org.xolstice.maven.plugins + protobuf-maven-plugin + 0.6.1 + + /usr/bin/protoc + + + + + compile + test-compile + + + + + + + + diff --git a/java/src/main/java/org/whispersystems/signalservice/api/crypto/SignalServiceCipher.java b/java/src/main/java/org/whispersystems/signalservice/api/crypto/SignalServiceCipher.java index d7cc397c27..8779aedb25 100644 --- a/java/src/main/java/org/whispersystems/signalservice/api/crypto/SignalServiceCipher.java +++ b/java/src/main/java/org/whispersystems/signalservice/api/crypto/SignalServiceCipher.java @@ -250,7 +250,7 @@ private Plaintext decrypt(SignalServiceEnvelope envelope, byte[] ciphertext) } else if (envelope.isUnidentifiedSender()) { SealedSessionCipher sealedSessionCipher = new SealedSessionCipher(signalProtocolStore, localAddress.getUuid().orNull(), localAddress.getNumber().orNull(), 1); DecryptionResult result = sealedSessionCipher.decrypt(certificateValidator, ciphertext, envelope.getServerTimestamp()); - SignalServiceAddress resultAddress = new SignalServiceAddress(UuidUtil.parse(result.getSenderUuid().orNull()), result.getSenderE164()); + SignalServiceAddress resultAddress = new SignalServiceAddress(UuidUtil.parse(result.getSenderUuid()), result.getSenderE164()); SignalProtocolAddress protocolAddress = getPreferredProtocolAddress(signalProtocolStore, resultAddress, result.getDeviceId()); paddedMessage = result.getPaddedMessage(); diff --git a/java/src/main/java/org/whispersystems/signalservice/internal/contacts/crypto/ContactDiscoveryCipher.java b/java/src/main/java/org/whispersystems/signalservice/internal/contacts/crypto/ContactDiscoveryCipher.java index 1e3e46efc5..a138cefb8e 100644 --- a/java/src/main/java/org/whispersystems/signalservice/internal/contacts/crypto/ContactDiscoveryCipher.java +++ b/java/src/main/java/org/whispersystems/signalservice/internal/contacts/crypto/ContactDiscoveryCipher.java @@ -1,12 +1,8 @@ package org.whispersystems.signalservice.internal.contacts.crypto; -import org.threeten.bp.Instant; -import org.threeten.bp.LocalDateTime; -import org.threeten.bp.Period; -import org.threeten.bp.ZoneId; -import org.threeten.bp.ZonedDateTime; -import org.threeten.bp.format.DateTimeFormatter; +import java.time.*; +import java.time.format.*; import org.whispersystems.libsignal.util.ByteUtil; import org.whispersystems.signalservice.api.crypto.InvalidCiphertextException; import org.whispersystems.signalservice.internal.contacts.entities.DiscoveryRequest; From 6e9d375bc61eeb2d52a0e01ca14127825fa2483a Mon Sep 17 00:00:00 2001 From: Johan Vos Date: Wed, 8 Sep 2021 11:46:43 +0200 Subject: [PATCH 2/2] Use correct name for the artifact. --- java/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/pom.xml b/java/pom.xml index b456a07825..a8fe4fd395 100755 --- a/java/pom.xml +++ b/java/pom.xml @@ -7,7 +7,7 @@ 2.15.4-SNAPSHOT jar - webscheduler + signal-service-java UTF-8