return absent when null

This commit is contained in:
ligi 2014-06-05 16:53:18 +02:00
parent edc74f015d
commit 4a9ee42a3c

View file

@ -164,6 +164,9 @@ public class AndroidfileSystemPassStore implements PassStore {
@Override @Override
public Optional<Passbook> getCurrentPass() { public Optional<Passbook> getCurrentPass() {
if (actPass == null) {
return Optional.absent();
}
return Optional.of(actPass); return Optional.of(actPass);
} }