From d4b7f8acd77abb7be6eb599f723d0c626ead2c02 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 22 Nov 2014 13:57:51 +0100 Subject: [PATCH] Move exception to correct class. --- src/main/java/net/pterodactylus/sone/data/Image.java | 2 ++ src/main/java/net/pterodactylus/sone/data/impl/ImageImpl.java | 2 -- src/main/java/net/pterodactylus/sone/web/UploadImagePage.java | 2 +- src/test/java/net/pterodactylus/sone/data/impl/ImageImplTest.java | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) 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; -- 2.7.4