Sebastian Stenzel 5 rokov pred
rodič
commit
97dfe9a1d4

+ 1 - 2
main/ui/src/main/java/org/cryptomator/ui/recoverykey/WordEncoder.java

@@ -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) {