package net.pterodactylus.sone.data;
-import static com.google.common.base.Preconditions.*;
+import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.FluentIterable.from;
import static java.util.Arrays.asList;
import static net.pterodactylus.sone.data.Album.FLATTENER;
@Override
public boolean apply(Sone sone) {
- return sone.getTime() != 0;
+ return (sone == null) ? false : sone.getTime() != 0;
}
};
@Override
public boolean apply(Sone sone) {
- return sone.getIdentity() instanceof OwnIdentity;
+ return (sone == null) ? false : sone.getIdentity() instanceof OwnIdentity;
}
};
@Override
public boolean apply(Sone sone) {
- return !sone.getRootAlbum().getAlbums().isEmpty();
+ return (sone == null) ? false : !sone.getRootAlbum().getAlbums().isEmpty();
}
};