From: David ‘Bombe’ Roden Date: Sat, 12 Oct 2013 13:12:45 +0000 (+0200) Subject: Don’t use albums in abstract image builders. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=835eaad37c4ba9b634a57356d56b3b8711fdff1b;p=Sone.git Don’t use albums in abstract image builders. --- 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