aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-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++) {