X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2Fimpl%2FAbstractPostReplyBuilder.java;h=0fe124ed0ad9abc36b8a7abfc7f86bd950f8f249;hb=refs%2Ftags%2Fv79;hp=952a94eace4ccbcda121edce048c79a326937952;hpb=6f019de1d4d9742981d851ac3c9097cca8bff58e;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 952a94e..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 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");
}