#88 Added Errorprone to project

This commit is contained in:
Shekhar Gulati
2017-06-17 03:50:21 +05:30
parent f5d9a0b535
commit 5e5440119d
2 changed files with 5 additions and 2 deletions
+3 -2
View File
@@ -26,6 +26,7 @@
package strman;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.function.Predicate;
import java.util.function.Supplier;
@@ -324,7 +325,7 @@ public abstract class Strman {
*/
public static String base64Decode(final String value) {
validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
return new String(Base64.getDecoder().decode(value));
return new String(Base64.getDecoder().decode(value), StandardCharsets.UTF_8);
}
/**
@@ -335,7 +336,7 @@ public abstract class Strman {
*/
public static String base64Encode(final String value) {
validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
return Base64.getEncoder().encodeToString(value.getBytes());
return Base64.getEncoder().encodeToString(value.getBytes(StandardCharsets.UTF_8));
}
/**