aboutsummaryrefslogtreecommitdiff
path: root/juick-spring-www/src/main/java/com/juick/www
diff options
context:
space:
mode:
Diffstat (limited to 'juick-spring-www/src/main/java/com/juick/www')
-rw-r--r--juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java3
-rw-r--r--juick-spring-www/src/main/java/com/juick/www/controllers/PostController.java8
-rw-r--r--juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java2
3 files changed, 7 insertions, 6 deletions
diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java
index 9fceb23c..f590fc7c 100644
--- a/juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java
+++ b/juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java
@@ -11,6 +11,7 @@ import com.juick.util.MessageUtils;
import com.juick.util.UserUtils;
import com.juick.util.WebUtils;
import com.juick.www.WebApp;
+import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
@@ -64,7 +65,7 @@ public class PMController {
List<com.juick.Message> msgs = pmQueriesService.getLastPMSent(visitor.getUid());
if (WebUtils.isNotUserName(uname)) {
- uname = "";
+ uname = StringUtils.EMPTY;
}
context.put("title", title);
context.put("msgs", msgs);
diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/PostController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/PostController.java
index 1ce2f893..01f011be 100644
--- a/juick-spring-www/src/main/java/com/juick/www/controllers/PostController.java
+++ b/juick-spring-www/src/main/java/com/juick/www/controllers/PostController.java
@@ -69,7 +69,7 @@ public class PostController {
@RequestParam(required = false) MultipartFile attach,
ModelMap modelMap
) throws IOException {
- body = body.replace("\r", "");
+ body = body.replace("\r", StringUtils.EMPTY);
List<Tag> tags = tagService.fromString(tagsStr, true);
@@ -144,8 +144,8 @@ public class PostController {
logger.warn("XMPP unavailable");
}
- String hashtags = "";
- String tagscomma = "";
+ String hashtags = StringUtils.EMPTY;
+ String tagscomma = StringUtils.EMPTY;
for (int i = 0; i < jmsg.getTags().size(); i++) {
if (i > 0) {
hashtags += " ";
@@ -195,7 +195,7 @@ public class PostController {
if (body.length() < 1 || body.length() > 4096) {
throw new HttpBadRequestException();
}
- body = body.replace("\r", "");
+ body = body.replace("\r", StringUtils.EMPTY);
User visitor = UserUtils.getCurrentUser();
diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java
index 65309e4e..d1c872d7 100644
--- a/juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java
+++ b/juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java
@@ -123,7 +123,7 @@ public class SettingsController {
if (StringUtils.isEmpty(page) || !pages.contains(page)) {
throw new HttpBadRequestException();
}
- String result = "";
+ String result = StringUtils.EMPTY;
switch (page) {
case "password":
if (userService.updatePassword(visitor, password)) {