A few warning fixes

This commit is contained in:
Vankka 2023-12-23 00:32:25 +02:00
parent 7297cad96c
commit 17e888a289
No known key found for this signature in database
GPG Key ID: 6E50CB7A29B96AD0
3 changed files with 3 additions and 2 deletions

View File

@ -141,6 +141,7 @@ public abstract class ConfigurateConfigManager<T, LT extends AbstractConfigurati
return new IChannelConfig.Serializer(mapperFactory, BaseChannelConfig.class, ChannelConfig.class);
}
@SuppressWarnings("unchecked") // Special Class cast
public ConfigurationOptions configurationOptions(ObjectMapper.Factory objectMapper, boolean headerSubstitutions) {
String header = header();
if (header != null && headerSubstitutions) {

View File

@ -52,7 +52,7 @@ public class BinPasteService implements PasteService {
Request request = new Request.Builder()
.url(binUrl + "/v1/post")
.post(RequestBody.create(MediaType.get("application/json"), json.toString()))
.post(RequestBody.create(json.toString(), MediaType.get("application/json")))
.build();
try (Response response = discordSRV.httpClient().newCall(request).execute()) {

View File

@ -39,7 +39,7 @@ public class BytebinPasteService implements PasteService {
Request request = new Request.Builder()
.url(bytebinUrl + "/post")
//.header("Content-Encoding", "gzip")
.post(RequestBody.create(MediaType.get("application/octet-stream"), fileContent))
.post(RequestBody.create(fileContent, MediaType.get("application/octet-stream")))
.build();
try (Response response = discordSRV.httpClient().newCall(request).execute()) {