You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2018/12/25 21:03:56 UTC

[jspwiki] branch master updated: revert change on PageSorter, breaks build :-/

This is an automated email from the ASF dual-hosted git repository.

juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git


The following commit(s) were added to refs/heads/master by this push:
     new 490fe2d  revert change on PageSorter, breaks build :-/
490fe2d is described below

commit 490fe2da366273ae5d0ac7854dc422eec59145cb
Author: juanpablo <ju...@apache.org>
AuthorDate: Tue Dec 25 22:03:29 2018 +0100

    revert change on PageSorter, breaks build :-/
---
 jspwiki-main/src/main/java/org/apache/wiki/PageSorter.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/jspwiki-main/src/main/java/org/apache/wiki/PageSorter.java b/jspwiki-main/src/main/java/org/apache/wiki/PageSorter.java
index 94fe252..5c1819b 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/PageSorter.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/PageSorter.java
@@ -141,13 +141,14 @@ public class PageSorter implements Comparator< Object > {
      * 
      * @param props this WikiEngine's properties.
      */
+    @SuppressWarnings( "unchecked" )
     public void initialize( Properties props ) {
         // Default is Java natural order
         m_comparator = JavaNaturalComparator.DEFAULT_JAVA_COMPARATOR;
         String className = props.getProperty( PROP_PAGE_NAME_COMPARATOR );
         if( className != null && className.length() > 0 ) {
             try {
-                m_comparator = ClassUtil.getMappedObject( "org.apache.wiki.util.comparators." + className );
+                m_comparator = (Comparator<String>) ClassUtil.findClass( "org.apache.wiki.util.comparators", className ).newInstance();
             } catch( Exception e ) {
                 log.error( "Falling back to default \"natural\" comparator", e );
             }