X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2Fimpl%2FAbstractPostReplyBuilder.java;h=0fe124ed0ad9abc36b8a7abfc7f86bd950f8f249;hb=41ca6590c4a7372cb4f687f6e3cfdc2fab232703;hp=10bdf766a5a86fe610b7d58e991a75c8340687a3;hpb=3d6cffe82270a1faacf1f0d39c34b11ab316e0db;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/data/impl/AbstractPostReplyBuilder.java b/src/main/java/net/pterodactylus/sone/data/impl/AbstractPostReplyBuilder.java
index 10bdf76..0fe124e 100644
--- a/src/main/java/net/pterodactylus/sone/data/impl/AbstractPostReplyBuilder.java
+++ b/src/main/java/net/pterodactylus/sone/data/impl/AbstractPostReplyBuilder.java
@@ -1,5 +1,5 @@
/*
- * Sone - AbstractPostReplyBuilder.java - Copyright © 2013â2016 David Roden
+ * Sone - AbstractPostReplyBuilder.java - Copyright © 2013â2019 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,16 +19,12 @@ package net.pterodactylus.sone.data.impl;
import static com.google.common.base.Preconditions.checkState;
-import org.apache.commons.lang.StringUtils;
-
import net.pterodactylus.sone.database.PostReplyBuilder;
/**
* Abstract {@link PostReplyBuilder} implementation. It stores the state of the
* new post and performs validation, implementations only need to implement
* {@link #build()}.
- *
- * @author David âBombeâ Roden
*/
public abstract class AbstractPostReplyBuilder extends AbstractReplyBuilder implements PostReplyBuilder {
@@ -58,7 +54,7 @@ public abstract class AbstractPostReplyBuilder extends AbstractReplyBuilder= 0)), "either current time or custom time must be set");
- checkState(!StringUtils.isBlank(text), "text must not be empty");
+ checkState((text != null) && !text.trim().isEmpty(), "text must not be empty");
checkState(postId != null, "post must not be null");
}