From 835eaad37c4ba9b634a57356d56b3b8711fdff1b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 12 Oct 2013 15:12:45 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20use=20albums=20in=20abstract=20i?= =?utf8?q?mage=20builders.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../net/pterodactylus/sone/data/impl/AbstractImageBuilder.java | 8 -------- .../net/pterodactylus/sone/data/impl/DefaultImageBuilder.java | 4 +++- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/data/impl/AbstractImageBuilder.java b/src/main/java/net/pterodactylus/sone/data/impl/AbstractImageBuilder.java index 0803084..1692bee 100644 --- a/src/main/java/net/pterodactylus/sone/data/impl/AbstractImageBuilder.java +++ b/src/main/java/net/pterodactylus/sone/data/impl/AbstractImageBuilder.java @@ -16,11 +16,9 @@ */ package net.pterodactylus.sone.data.impl; -import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; import static java.util.UUID.randomUUID; -import net.pterodactylus.sone.data.Album; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.database.ImageBuilder; @@ -32,8 +30,6 @@ import net.pterodactylus.sone.database.ImageBuilder; */ public abstract class AbstractImageBuilder implements ImageBuilder { - protected final Album album; - /** Whether to create an album with a random ID. */ protected boolean randomId; @@ -46,10 +42,6 @@ public abstract class AbstractImageBuilder implements ImageBuilder { protected int width; protected int height; - public AbstractImageBuilder(Album album) { - this.album = checkNotNull(album, "album must not be null"); - } - @Override public ImageBuilder randomId() { randomId = true; diff --git a/src/main/java/net/pterodactylus/sone/data/impl/DefaultImageBuilder.java b/src/main/java/net/pterodactylus/sone/data/impl/DefaultImageBuilder.java index 7f7f53f..29cab0c 100644 --- a/src/main/java/net/pterodactylus/sone/data/impl/DefaultImageBuilder.java +++ b/src/main/java/net/pterodactylus/sone/data/impl/DefaultImageBuilder.java @@ -28,8 +28,10 @@ import net.pterodactylus.sone.database.ImageBuilder; */ public class DefaultImageBuilder extends AbstractImageBuilder { + protected final Album album; + public DefaultImageBuilder(Album album) { - super(album); + this.album = album; } @Override -- 2.7.4