From: David ‘Bombe’ Roden Date: Sat, 25 Mar 2017 10:41:19 +0000 (+0100) Subject: Add nullability annotations to getAlbum method X-Git-Tag: 0.9.7^2~278 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7cd4d9d35a4698d4e98b6e2d215102c7b1751b34;p=Sone.git Add nullability annotations to getAlbum method --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index a4fde13..4474e46 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -40,6 +40,9 @@ import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + import net.pterodactylus.sone.core.ConfigurationSoneParser.InvalidAlbumFound; import net.pterodactylus.sone.core.ConfigurationSoneParser.InvalidImageFound; import net.pterodactylus.sone.core.ConfigurationSoneParser.InvalidParentAlbumFound; @@ -534,7 +537,8 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, * @return The album with the given ID, or {@code null} if no album with the * given ID exists */ - public Album getAlbum(String albumId) { + @Nullable + public Album getAlbum(@Nonnull String albumId) { return database.getAlbum(albumId).orNull(); }