Use java.util.Optional in Manager interface

This commit is contained in:
AsamK 2021-10-31 18:01:17 +01:00
parent f39983f78a
commit 1e87240db8
8 changed files with 19 additions and 16 deletions

View file

@ -8,10 +8,10 @@ import org.asamk.signal.OutputWriter;
import org.asamk.signal.commands.exceptions.CommandException;
import org.asamk.signal.commands.exceptions.IOErrorException;
import org.asamk.signal.manager.Manager;
import org.whispersystems.libsignal.util.guava.Optional;
import java.io.File;
import java.io.IOException;
import java.util.Optional;
public class UpdateProfileCommand implements JsonRpcLocalCommand {
@ -45,7 +45,7 @@ public class UpdateProfileCommand implements JsonRpcLocalCommand {
boolean removeAvatar = Boolean.TRUE.equals(ns.getBoolean("remove-avatar"));
Optional<File> avatarFile = removeAvatar
? Optional.absent()
? Optional.empty()
: avatarPath == null ? null : Optional.of(new File(avatarPath));
try {