roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1605652 - in /roller/trunk/app: ./ src/main/java/org/apache/roller/weblogger/business/jpa/ src/main/java/org/apache/roller/weblogger/ui/rendering/model/ src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/
Date Thu, 26 Jun 2014 02:40:47 GMT
Author: gmazza
Date: Thu Jun 26 02:40:46 2014
New Revision: 1605652

URL: http://svn.apache.org/r1605652
Log:
ROL-1994 Removed use of Commons Collections ReverseComparator() in favor of JDK Collections.reverseOrder(),
upgrade to Lucene 4.9.0

Modified:
    roller/trunk/app/pom.xml
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesDayPager.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesLatestPager.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesMonthPager.java

Modified: roller/trunk/app/pom.xml
URL: http://svn.apache.org/viewvc/roller/trunk/app/pom.xml?rev=1605652&r1=1605651&r2=1605652&view=diff
==============================================================================
--- roller/trunk/app/pom.xml (original)
+++ roller/trunk/app/pom.xml Thu Jun 26 02:40:46 2014
@@ -22,7 +22,7 @@
         <testThemesDir>${project.build.testOutputDirectory}${file.separator}themes</testThemesDir>
         <testIndexDir>${project.build.testOutputDirectory}${file.separator}index</testIndexDir>
         <testPlanetCache>${project.build.testOutputDirectory}${file.separator}planetcache</testPlanetCache>
-        <lucene.version>4.8.1</lucene.version>
+        <lucene.version>4.9.0</lucene.version>
         <spring.version>4.0.5.RELEASE</spring.version>
         <spring.security.version>3.2.4.RELEASE</spring.security.version>
     </properties>

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java?rev=1605652&r1=1605651&r2=1605652&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
Thu Jun 26 02:40:46 2014
@@ -24,7 +24,6 @@ import java.sql.Timestamp;
 import javax.persistence.NoResultException;
 import javax.persistence.Query;
 
-import org.apache.commons.collections.comparators.ReverseComparator;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -70,9 +69,6 @@ public class JPAWeblogEntryManagerImpl i
     // cached mapping of entryAnchors -> entryIds
     private Map<String, String> entryAnchorToIdMap = new HashMap<String, String>();
     
-    /* inline creation of reverse comparator, anonymous inner class */
-    private static final Comparator REVERSE_COMPARATOR = new ReverseComparator();
-    
     private static final Comparator TAG_STAT_NAME_COMPARATOR = new TagStatComparator();
     
     private static final Comparator TAG_STAT_COUNT_REVERSE_COMPARATOR =
@@ -775,7 +771,7 @@ public class JPAWeblogEntryManagerImpl i
     
     private Map getWeblogEntryMap(WeblogEntrySearchCriteria wesc, boolean stringsOnly) throws
WebloggerException {
 
-        TreeMap map = new TreeMap(REVERSE_COMPARATOR);
+        TreeMap map = new TreeMap(Collections.reverseOrder());
 
         List<WeblogEntry> entries = getWeblogEntries(wesc);
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.java?rev=1605652&r1=1605651&r2=1605652&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.java
Thu Jun 26 02:40:46 2014
@@ -267,10 +267,6 @@ public class SearchResultsFeedModel impl
 		return categories;
 	}
 
-	public boolean isWebsiteSpecificSearch() {
-		return websiteSpecificSearch;
-	}
-
 	public String getCategoryName() {
 		return feedRequest.getWeblogCategoryName();
 	}

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.java?rev=1605652&r1=1605651&r2=1605652&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.java
Thu Jun 26 02:40:46 2014
@@ -20,13 +20,13 @@ package org.apache.roller.weblogger.ui.r
 
 import java.io.IOException;
 import java.sql.Timestamp;
+import java.util.Collections;
 import java.util.Date;
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.TreeSet;
 
-import org.apache.commons.collections.comparators.ReverseComparator;
 import org.apache.commons.lang3.StringEscapeUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.lucene.document.Document;
@@ -67,7 +67,7 @@ public class SearchResultsModel extends 
 
 	// the actual search results mapped by Day -> Set of entries
 	private Map<Date, TreeSet<WeblogEntryWrapper>> results
-            = new TreeMap<Date, TreeSet<WeblogEntryWrapper>>(new ReverseComparator());
+            = new TreeMap<Date, TreeSet<WeblogEntryWrapper>>(Collections.reverseOrder());
 
 	// the pager used by the 3.0+ rendering system
 	private SearchResultsPager pager = null;
@@ -278,10 +278,6 @@ public class SearchResultsModel extends 
 		return categories;
 	}
 
-	public boolean isWebsiteSpecificSearch() {
-		return websiteSpecificSearch;
-	}
-
 	public String getErrorMessage() {
 		return errorMessage;
 	}

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesDayPager.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesDayPager.java?rev=1605652&r1=1605651&r2=1605652&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesDayPager.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesDayPager.java
Thu Jun 26 02:40:46 2014
@@ -21,11 +21,11 @@ package org.apache.roller.weblogger.ui.r
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
-import org.apache.commons.collections.comparators.ReverseComparator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.business.WebloggerFactory;
@@ -111,7 +111,7 @@ public class WeblogEntriesDayPager exten
         endDate = DateUtil.getEndOfDay(endDate, cal);
         
         if (entries == null) {
-            entries = new TreeMap<Date, List<WeblogEntryWrapper>>(new ReverseComparator());
+            entries = new TreeMap<Date, List<WeblogEntryWrapper>>(Collections.reverseOrder());
             try {
                 WeblogEntrySearchCriteria wesc = new WeblogEntrySearchCriteria();
                 wesc.setWeblog(weblog);

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesLatestPager.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesLatestPager.java?rev=1605652&r1=1605651&r2=1605652&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesLatestPager.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesLatestPager.java
Thu Jun 26 02:40:46 2014
@@ -19,11 +19,11 @@
 package org.apache.roller.weblogger.ui.rendering.pagers;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
-import org.apache.commons.collections.comparators.ReverseComparator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.business.URLStrategy;
@@ -69,7 +69,7 @@ public class WeblogEntriesLatestPager ex
     public Map<Date, List<WeblogEntryWrapper>> getEntries() {
         
         if (entries == null) {
-            entries = new TreeMap<Date, List<WeblogEntryWrapper>>(new ReverseComparator());
+            entries = new TreeMap<Date, List<WeblogEntryWrapper>>(Collections.reverseOrder());
             try {
                 WeblogEntrySearchCriteria wesc = new WeblogEntrySearchCriteria();
                 wesc.setWeblog(weblog);

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesMonthPager.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesMonthPager.java?rev=1605652&r1=1605651&r2=1605652&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesMonthPager.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/pagers/WeblogEntriesMonthPager.java
Thu Jun 26 02:40:46 2014
@@ -21,11 +21,11 @@ package org.apache.roller.weblogger.ui.r
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
-import org.apache.commons.collections.comparators.ReverseComparator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.business.WebloggerFactory;
@@ -107,7 +107,7 @@ public class WeblogEntriesMonthPager ext
         Date endDate = DateUtil.getEndOfMonth(date, cal);
         
         if (entries == null) {
-            entries = new TreeMap<Date, List<WeblogEntryWrapper>>(new ReverseComparator());
+            entries = new TreeMap<Date, List<WeblogEntryWrapper>>(Collections.reverseOrder());
             try {
                 WeblogEntrySearchCriteria wesc = new WeblogEntrySearchCriteria();
                 wesc.setWeblog(weblog);



Mime
View raw message