Skip to content

Commit

Permalink
fix: remove unneeded check
Browse files Browse the repository at this point in the history
  • Loading branch information
arifBurakDemiray committed Dec 7, 2023
1 parent b9634df commit 93af50b
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions sdk-java/src/main/java/ly/count/sdk/java/internal/Transport.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.security.spec.X509EncodedKeySpec;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Base64;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -253,21 +252,12 @@ byte[] getPictureDataFromGivenValue(String picture) {
data = Files.readAllBytes(file.toPath());
} catch (Throwable t) {
//if we can't read it from disk, we assume it is a base64 encoded byte array
data = readBase64String(picture);
data = Utils.Base64.decode(picture, L);
}

return data;
}

private byte[] readBase64String(String string) {
try {
return Base64.getDecoder().decode(string);
} catch (IllegalArgumentException e) {
L.w("[Transport] readBase64String, Error while reading base64 string " + e);
return null;
}
}

String response(HttpURLConnection connection) {
BufferedReader reader = null;
try {
Expand Down

0 comments on commit 93af50b

Please sign in to comment.