From 213b2fcb4476322c13fc205dccac745eb181d0dc Mon Sep 17 00:00:00 2001 From: Luck Date: Tue, 19 Nov 2019 18:09:14 +0000 Subject: [PATCH] Downgrade okhttp & okio --- common/build.gradle | 4 ++-- .../lucko/luckperms/common/dependencies/Dependency.java | 8 ++++---- .../java/me/lucko/luckperms/common/web/BytebinClient.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/build.gradle b/common/build.gradle index 53f880168..52924d44c 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -19,8 +19,8 @@ dependencies { compile 'com.google.code.gson:gson:2.7' compile 'com.google.guava:guava:19.0' compile 'com.github.ben-manes.caffeine:caffeine:2.8.0' - compile 'com.squareup.okhttp3:okhttp:4.2.2' - compile 'com.squareup.okio:okio:2.2.2' + compile 'com.squareup.okhttp3:okhttp:3.14.4' + compile 'com.squareup.okio:okio:1.17.4' compile('me.lucko.configurate:configurate-core:3.5') { exclude(module: 'guava') } diff --git a/common/src/main/java/me/lucko/luckperms/common/dependencies/Dependency.java b/common/src/main/java/me/lucko/luckperms/common/dependencies/Dependency.java index adfe8cb14..59b90e1c1 100644 --- a/common/src/main/java/me/lucko/luckperms/common/dependencies/Dependency.java +++ b/common/src/main/java/me/lucko/luckperms/common/dependencies/Dependency.java @@ -121,15 +121,15 @@ public enum Dependency { OKIO( "com{}squareup{}" + RelocationHelper.OKIO_STRING, RelocationHelper.OKIO_STRING, - "2.2.2", - "5YyXQGprsROIk3UCmaxjxqoEs4trSerhv8rRpj75uhs=", + "1.17.4", + "14+sWIRY/AmebILpH+XwN1xnQ0YmRRo6d3csZdnu6Fs=", Relocation.of(RelocationHelper.OKIO_STRING, RelocationHelper.OKIO_STRING) ), OKHTTP( "com{}squareup{}" + RelocationHelper.OKHTTP3_STRING, "okhttp", - "4.2.2", - "UGQYLP9AsQDOV/vzzpheEuOM9EM3JOgbF1wYQ+rsu3U=", + "3.14.4", + "WMyzdU8VzELfjxaHs7qGMw7ZfH5S5cPoP+ETG4DOPg8=", Relocation.of(RelocationHelper.OKHTTP3_STRING, RelocationHelper.OKHTTP3_STRING), Relocation.of(RelocationHelper.OKIO_STRING, RelocationHelper.OKIO_STRING) ), diff --git a/common/src/main/java/me/lucko/luckperms/common/web/BytebinClient.java b/common/src/main/java/me/lucko/luckperms/common/web/BytebinClient.java index acf52514b..e95327048 100644 --- a/common/src/main/java/me/lucko/luckperms/common/web/BytebinClient.java +++ b/common/src/main/java/me/lucko/luckperms/common/web/BytebinClient.java @@ -79,7 +79,7 @@ public class BytebinClient extends AbstractHttpClient { * @throws IOException if an error occurs */ public Content postContent(byte[] buf, MediaType contentType, boolean allowModification) throws IOException { - RequestBody body = RequestBody.create(buf, contentType); + RequestBody body = RequestBody.create(contentType, buf); Request.Builder requestBuilder = new Request.Builder() .url(this.url + "post") @@ -122,7 +122,7 @@ public class BytebinClient extends AbstractHttpClient { throw new IllegalArgumentException("Existing content is not modifiable"); } - RequestBody body = RequestBody.create(buf, contentType); + RequestBody body = RequestBody.create(contentType, buf); Request.Builder requestBuilder = new Request.Builder() .url(this.url + existingContent.key())