aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Utils.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-12-20 14:28:00 +0300
committerGravatar Vitaly Takmazov2016-12-20 14:28:00 +0300
commit3859c9616d0a7a04e68427d173b863161b818140 (patch)
treecba4d1aea88b7ce0d94cbc30fc05f765c9faaa15 /juick-www/src/main/java/com/juick/www/Utils.java
parent8b02f969d3a09e39557474eb90ec821d550e3b1b (diff)
StringUtils.EMPTY
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Utils.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/Utils.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Utils.java b/juick-www/src/main/java/com/juick/www/Utils.java
index b860504e..ca3535fd 100644
--- a/juick-www/src/main/java/com/juick/www/Utils.java
+++ b/juick-www/src/main/java/com/juick/www/Utils.java
@@ -23,6 +23,7 @@ import com.juick.server.TagQueries;
import com.mitchellbosecke.pebble.PebbleEngine;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -110,7 +111,7 @@ public class Utils {
public static String getPartFilename(Part part) {
for (String cd : part.getHeader("content-disposition").split(";")) {
if (cd.trim().startsWith("filename")) {
- String filename = cd.substring(cd.indexOf('=') + 1).trim().replace("\"", "");
+ String filename = cd.substring(cd.indexOf('=') + 1).trim().replace("\"", StringUtils.EMPTY);
return filename.substring(filename.lastIndexOf('/') + 1).substring(filename.lastIndexOf('\\') + 1); // MSIE fix.
}
}