From: David ‘Bombe’ Roden Date: Sat, 22 Nov 2014 12:57:51 +0000 (+0100) Subject: Move exception to correct class. X-Git-Tag: 0.9-rc1^2~3^2~19 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d4b7f8acd77abb7be6eb599f723d0c626ead2c02;p=Sone.git Move exception to correct class. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Image.java b/src/main/java/net/pterodactylus/sone/data/Image.java index e3e1b4d..22ddc29 100644 --- a/src/main/java/net/pterodactylus/sone/data/Image.java +++ b/src/main/java/net/pterodactylus/sone/data/Image.java @@ -134,6 +134,8 @@ public interface Image extends Identified, Fingerprintable { Image update() throws IllegalStateException; + class ImageTitleMustNotBeEmpty extends IllegalStateException { } + } } diff --git a/src/main/java/net/pterodactylus/sone/data/impl/ImageImpl.java b/src/main/java/net/pterodactylus/sone/data/impl/ImageImpl.java index e9c8fa9..2df98b1 100644 --- a/src/main/java/net/pterodactylus/sone/data/impl/ImageImpl.java +++ b/src/main/java/net/pterodactylus/sone/data/impl/ImageImpl.java @@ -241,8 +241,6 @@ public class ImageImpl implements Image { }; } - public static class ImageTitleMustNotBeEmpty extends IllegalStateException { } - // // FINGERPRINTABLE METHODS // diff --git a/src/main/java/net/pterodactylus/sone/web/UploadImagePage.java b/src/main/java/net/pterodactylus/sone/web/UploadImagePage.java index 5812af5..5e23a78 100644 --- a/src/main/java/net/pterodactylus/sone/web/UploadImagePage.java +++ b/src/main/java/net/pterodactylus/sone/web/UploadImagePage.java @@ -33,7 +33,7 @@ import javax.imageio.ImageReader; import javax.imageio.stream.ImageInputStream; import net.pterodactylus.sone.data.Album; -import net.pterodactylus.sone.data.impl.ImageImpl.ImageTitleMustNotBeEmpty; +import net.pterodactylus.sone.data.Image.Modifier.ImageTitleMustNotBeEmpty; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.data.TemporaryImage; import net.pterodactylus.sone.text.TextFilter; diff --git a/src/test/java/net/pterodactylus/sone/data/impl/ImageImplTest.java b/src/test/java/net/pterodactylus/sone/data/impl/ImageImplTest.java index 0875284..b78f0f6 100644 --- a/src/test/java/net/pterodactylus/sone/data/impl/ImageImplTest.java +++ b/src/test/java/net/pterodactylus/sone/data/impl/ImageImplTest.java @@ -1,8 +1,7 @@ package net.pterodactylus.sone.data.impl; import net.pterodactylus.sone.data.Image; -import net.pterodactylus.sone.data.impl.ImageImpl; -import net.pterodactylus.sone.data.impl.ImageImpl.ImageTitleMustNotBeEmpty; +import net.pterodactylus.sone.data.Image.Modifier.ImageTitleMustNotBeEmpty; import org.junit.Test;