mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-14 08:41:28 +00:00
fixed unit test
This commit is contained in:
@@ -79,8 +79,7 @@ class WordEncoder {
|
||||
* @throws IllegalArgumentException If the encoded string doesn't consist of a multiple of two words or one of the words is unknown to this encoder.
|
||||
*/
|
||||
public byte[] decode(String encoded) {
|
||||
Preconditions.checkArgument(!Strings.isNullOrEmpty(encoded));
|
||||
List<String> splitted = Splitter.on(DELIMITER).omitEmptyStrings().splitToList(encoded);
|
||||
List<String> splitted = Splitter.on(DELIMITER).omitEmptyStrings().splitToList(Strings.nullToEmpty(encoded));
|
||||
Preconditions.checkArgument(splitted.size() % 2 == 0, "%s needs to be a multiple of two words", encoded);
|
||||
byte[] result = new byte[splitted.size() / 2 * 3];
|
||||
for (int i = 0; i < splitted.size(); i+=2) {
|
||||
|
||||
Reference in New Issue
Block a user