]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Fri, 26 Aug 2016 09:27:50 +0000 (11:27 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 28 Aug 2016 18:46:24 +0000 (20:46 +0200)
- sorted list reversed

src/java/org/mxchange/jjobs/beans/user/activity/JobsUserActivityWebApplicationBean.java

index 6dbd5476d8254ecd598f19e655d7407cca03d8a0..7c387ad75347de22b72b8db3de0f90c0d3bf8393 100644 (file)
@@ -17,6 +17,7 @@
 package org.mxchange.jjobs.beans.user.activity;
 
 import java.text.MessageFormat;
+import java.util.Collections;
 import java.util.GregorianCalendar;
 import java.util.LinkedHashMap;
 import java.util.LinkedList;
@@ -49,6 +50,7 @@ import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.activity.LogableUserActivity;
 import org.mxchange.jusercore.model.user.activity.UserActivityLog;
 import org.mxchange.jusercore.model.user.activity.UserActivityLogSessionBeanRemote;
+import org.mxchange.jusercore.model.user.activity.comparator.UserActivityLogTimestampComparator;
 
 /**
  * A controller (bean) for user activity log
@@ -443,6 +445,10 @@ public class JobsUserActivityWebApplicationBean extends BaseJobsController imple
                if (this.usersActivity.containsKey(user)) {
                        // Return it
                        list.addAll(this.usersActivity.get(user));
+
+                       // Sort list and reverse it
+                       Collections.sort(list, new UserActivityLogTimestampComparator());
+                       Collections.reverse(list);
                }
 
                // Return it