From 3859c9616d0a7a04e68427d173b863161b818140 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 20 Dec 2016 14:28:00 +0300 Subject: StringUtils.EMPTY --- .../src/main/java/com/juick/server/protocol/JuickProtocol.java | 3 ++- .../main/java/com/juick/server/protocol/annotation/UserCommand.java | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server/protocol') diff --git a/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java b/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java index a024a0eb..cd7a4bc1 100644 --- a/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java +++ b/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java @@ -8,6 +8,7 @@ import com.juick.server.helpers.TagStats; import com.juick.server.protocol.annotation.UserCommand; import com.juick.service.*; import com.juick.util.TagUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import javax.inject.Inject; @@ -110,7 +111,7 @@ public class JuickProtocol { bltags = tagService.getUserBLTags(user_from.getUid()); - String txt = ""; + String txt = StringUtils.EMPTY; if (bltags.size() > 0) { for (String bltag : bltags) { txt += "*" + bltag + "\n"; diff --git a/juick-server/src/main/java/com/juick/server/protocol/annotation/UserCommand.java b/juick-server/src/main/java/com/juick/server/protocol/annotation/UserCommand.java index af7c4924..42a9bb59 100644 --- a/juick-server/src/main/java/com/juick/server/protocol/annotation/UserCommand.java +++ b/juick-server/src/main/java/com/juick/server/protocol/annotation/UserCommand.java @@ -1,5 +1,7 @@ package com.juick.server.protocol.annotation; +import org.apache.commons.lang3.StringUtils; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -15,7 +17,7 @@ public @interface UserCommand { * * @return a command pattern */ - String pattern() default ""; + String pattern() default StringUtils.EMPTY; /** * @@ -27,5 +29,5 @@ public @interface UserCommand { * * @return a string used in HELP command output. Basically, only 1 string */ - String help() default ""; + String help() default StringUtils.EMPTY; } -- cgit v1.2.3