aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/http/www/User.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-06-27 14:10:16 +0300
committerGravatar Vitaly Takmazov2016-06-27 14:10:16 +0300
commit8a818bbd03913e7dc02430947b0fb1e5a950647a (patch)
tree064b554618489f58ff4ac56ad92db6538feb1560 /src/main/java/com/juick/http/www/User.java
parent8ecdfbd5a36c7cc4d48bb563c9b561a904033514 (diff)
fixes
Diffstat (limited to 'src/main/java/com/juick/http/www/User.java')
-rw-r--r--src/main/java/com/juick/http/www/User.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/juick/http/www/User.java b/src/main/java/com/juick/http/www/User.java
index 51b3965f..0bdd910e 100644
--- a/src/main/java/com/juick/http/www/User.java
+++ b/src/main/java/com/juick/http/www/User.java
@@ -320,7 +320,7 @@ public class User {
public static String pageUserTags(JdbcTemplate sql, com.juick.User user, com.juick.User visitor, int cnt) {
List<Tag> tags = TagQueries.getUserTagsAll(sql, user.getUID());
- int maxUsageCnt = tags.stream().map(t -> t.UsageCnt).max(Integer::max).get();
+ int maxUsageCnt = tags.stream().map(t -> t.UsageCnt).max(Integer::max).orElse(0);
String ret = "";
int count = Math.min(tags.size(), cnt);
for (int i = 0; i < count; i++) {