roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r576022 - /roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.java
Date Sun, 16 Sep 2007 01:52:26 GMT
Author: snoopdave
Date: Sat Sep 15 18:52:25 2007
New Revision: 576022

URL: http://svn.apache.org/viewvc?rev=576022&view=rev
Log:
hopefully the last of the JPA immutable result set bugs

Modified:
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.java

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.java?rev=576022&r1=576021&r2=576022&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/rendering/pagers/PlanetEntriesPager.java
Sat Sep 15 18:52:25 2007
@@ -108,14 +108,16 @@
                     rawEntries = planetManager.getEntries(group, startDate, null, offset,
length+1);
                 }
                 
+                results.addAll(rawEntries);
+                
                 // check if there are more results for paging
-                if(rawEntries.size() > length) {
+                if(results.size() > length) {
                     more = true;
-                    rawEntries.remove(rawEntries.size() - 1);
+                    results.remove(results.size() - 1);
                 }
                 
                 // wrap 'em
-                for (Iterator it = rawEntries.iterator(); it.hasNext();) {
+                for (Iterator it = results.iterator(); it.hasNext();) {
                     SubscriptionEntry entry = (SubscriptionEntry) it.next();
                     // TODO needs pojo wrapping from planet
                     results.add(entry);



Mime
View raw message