You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ja...@apache.org on 2009/04/13 17:12:10 UTC

svn commit: r764499 - in /incubator/jspwiki/trunk: ./ src/java/org/apache/wiki/ src/java/org/apache/wiki/action/ src/java/org/apache/wiki/plugin/ src/java/org/apache/wiki/rss/ src/java/org/apache/wiki/search/ src/java/org/apache/wiki/tags/ src/java/org...

Author: jalkanen
Date: Mon Apr 13 15:12:09 2009
New Revision: 764499

URL: http://svn.apache.org/viewvc?rev=764499&view=rev
Log:
Replaced all "instanceof Attachment" calls with WikiPage.isAttachment() calls.

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/src/java/org/apache/wiki/ReferenceManager.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/action/DeleteActionBean.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/plugin/RecentChangesPlugin.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/rss/RSSGenerator.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/search/LuceneSearchProvider.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchManager.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchProvider.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkTag.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkToParentTag.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkToTag.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/PageTypeTag.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/ParentPageNameTag.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandler.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java
    incubator/jspwiki/trunk/tests/java/org/apache/wiki/content/EnglishPluralsPageNameResolverTest.java

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Mon Apr 13 15:12:09 2009
@@ -5,6 +5,11 @@
         * At Andrew's suggestion, WikiName is now called WikiPath. Also changed
         relevant methods in WikiPage.
         
+        * Small build configuration changes since not all XML was validating.
+        
+        * Replaced all "instanceof Attachment" calls with WikiPage.isAttachment()
+        calls.
+        
 2009-04-12  Janne Jalkanen <ja...@apache.org>
 
         * 3.0.0-svn-100

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/ReferenceManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/ReferenceManager.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/ReferenceManager.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/ReferenceManager.java Mon Apr 13 15:12:09 2009
@@ -154,7 +154,7 @@
             {
                 WikiPage page = (WikiPage) it.next();
 
-                if( page instanceof Attachment )
+                if( page.isAttachment() )
                 {
                     // Skip attachments
                 }
@@ -187,7 +187,7 @@
             {
                 WikiPage page  = (WikiPage)it.next();
 
-                if( page instanceof Attachment )
+                if( page.isAttachment() )
                 {
                     // We cannot build a reference list from the contents
                     // of attachments, so we skip them.

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/action/DeleteActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/DeleteActionBean.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/action/DeleteActionBean.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/action/DeleteActionBean.java Mon Apr 13 15:12:09 2009
@@ -87,7 +87,7 @@
         }
 
         // If attachment deleted; always redirect to parent page
-        if( m_page instanceof Attachment )
+        if( m_page.isAttachment() )
         {
             String redirPage = m_page.getParent().getName();
             return new RedirectResolution( ViewActionBean.class, "view" ).addParameter( "page", redirPage );

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/plugin/RecentChangesPlugin.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/plugin/RecentChangesPlugin.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/plugin/RecentChangesPlugin.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/plugin/RecentChangesPlugin.java Mon Apr 13 15:12:09 2009
@@ -35,6 +35,7 @@
 import org.apache.wiki.log.LoggerFactory;
 import org.apache.wiki.preferences.Preferences;
 import org.apache.wiki.preferences.Preferences.TimeFormat;
+import org.apache.wiki.providers.ProviderException;
 import org.apache.wiki.util.TextUtil;
 
 
@@ -123,100 +124,108 @@
 
             for( WikiPage pageref : changes )
             {
-                Date lastmod = pageref.getLastModified();
-
-                if( lastmod.before( sincedate.getTime() ) )
+                try
                 {
-                    break;
-                }
+                    Date lastmod = pageref.getLastModified();
+
+                    if( lastmod.before( sincedate.getTime() ) )
+                    {
+                        break;
+                    }
                 
-                if( !isSameDay( lastmod, olddate ) )
-                {
-                    tr row = new tr();
-                    td col = new td();
+                    if( !isSameDay( lastmod, olddate ) )
+                    {
+                        tr row = new tr();
+                        td col = new td();
                     
-                    col.setColSpan(tablewidth).setClass("date"); 
-                    col.addElement( new b().addElement(fmt.format(lastmod)) );
+                        col.setColSpan(tablewidth).setClass("date"); 
+                        col.addElement( new b().addElement(fmt.format(lastmod)) );
 
-                    rt.addElement(row);
-                    row.addElement(col);                    
-                    olddate = lastmod;
-                }
+                        rt.addElement(row);
+                        row.addElement(col);                    
+                        olddate = lastmod;
+                    }
 
-                String link = context.getURL( pageref instanceof Attachment ? WikiContext.ATTACH : WikiContext.VIEW, 
-                                              pageref.getName() ) ;
+                    String link = context.getURL( pageref.isAttachment() ? WikiContext.ATTACH : WikiContext.VIEW, 
+                                                  pageref.getName() ) ;
                 
-                a linkel = new a(link,engine.beautifyTitle(pageref.getName()));
+                    a linkel = new a(link,engine.beautifyTitle(pageref.getName()));
                 
-                tr row = new tr();
+                    tr row = new tr();
                 
-                td col = new td().setWidth("30%").addElement(linkel);
+                    td col = new td().setWidth("30%").addElement(linkel);
 
-                //
-                //  Add the direct link to the attachment info.
-                //
-                if( pageref instanceof Attachment )
-                {
-                    linkel = new a().setHref(context.getURL(WikiContext.INFO,pageref.getName()));
-                    linkel.setClass("infolink");
-                    linkel.addElement( new img().setSrc(context.getURL(WikiContext.NONE, "images/attachment_small.png")));
+                    //
+                    //  Add the direct link to the attachment info.
+                    //
+                    if( pageref.isAttachment() )
+                    {
+                        linkel = new a().setHref(context.getURL(WikiContext.INFO,pageref.getName()));
+                        linkel.setClass("infolink");
+                        linkel.addElement( new img().setSrc(context.getURL(WikiContext.NONE, "images/attachment_small.png")));
 
-                    col.addElement( linkel );
-                }
+                        col.addElement( linkel );
+                    }
 
                 
-                row.addElement(col);
-                rt.addElement(row);
+                    row.addElement(col);
+                    rt.addElement(row);
                 
-                if( pageref instanceof Attachment )
-                {
-                    row.addElement( new td(tfmt.format(lastmod)).setClass("lastchange") );
-                }
-                else
-                {
-                    td infocol = (td) new td().setClass("lastchange");
-                    infocol.addElement( new a(context.getURL(WikiContext.DIFF, pageref.getName(), "r1=-1"),tfmt.format(lastmod)) );
-                    row.addElement(infocol);
-                }
+                    if( pageref.isAttachment() )
+                    {
+                        row.addElement( new td(tfmt.format(lastmod)).setClass("lastchange") );
+                    }
+                    else
+                    {
+                        td infocol = (td) new td().setClass("lastchange");
+                        infocol.addElement( new a(context.getURL(WikiContext.DIFF, pageref.getName(), "r1=-1"),tfmt.format(lastmod)) );
+                        row.addElement(infocol);
+                    }
 
-                //
-                //  Display author information.
-                //
+                    //
+                    //  Display author information.
+                    //
 
-                if( showAuthor )
-                {
-                    String author = pageref.getAuthor();
+                    if( showAuthor )
+                    {
+                        String author = pageref.getAuthor();
 
-                    td authorinfo = new td();
-                    authorinfo.setClass("author");
+                        td authorinfo = new td();
+                        authorinfo.setClass("author");
                     
-                    if( author != null )
-                    {
-                        if( engine.pageExists(author) )
+                        if( author != null )
                         {
-                            authorinfo.addElement( new a(context.getURL(WikiContext.VIEW, author),author) );
+                            if( engine.pageExists(author) )
+                            {
+                                authorinfo.addElement( new a(context.getURL(WikiContext.VIEW, author),author) );
+                            }
+                            else
+                            {
+                                authorinfo.addElement(author);
+                            }
                         }
                         else
                         {
-                            authorinfo.addElement(author);
+                            authorinfo.addElement( context.getBundle(InternationalizationManager.CORE_BUNDLE).getString( "common.unknownauthor" ) );
                         }
+
+                        row.addElement( authorinfo );
                     }
-                    else
+
+                    // Change note
+                    if( showChangenote )
                     {
-                        authorinfo.addElement( context.getBundle(InternationalizationManager.CORE_BUNDLE).getString( "common.unknownauthor" ) );
+                        String changenote = (String)pageref.getAttribute(WikiPage.CHANGENOTE);
+                    
+                        row.addElement( new td(changenote != null ? TextUtil.replaceEntities(changenote) : "").setClass("changenote") );
                     }
-
-                    row.addElement( authorinfo );
                 }
-
-                // Change note
-                if( showChangenote )
+                catch( ProviderException e )
                 {
-                    String changenote = (String)pageref.getAttribute(WikiPage.CHANGENOTE);
-                    
-                    row.addElement( new td(changenote != null ? TextUtil.replaceEntities(changenote) : "").setClass("changenote") );
+                    // FIXME: Not sure what should go here.
                 }
                 
+                
                 //  Revert note
 /*                
                 if( context.hasAdminPermissions() )

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/rss/RSSGenerator.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/rss/RSSGenerator.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/rss/RSSGenerator.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/rss/RSSGenerator.java Mon Apr 13 15:12:09 2009
@@ -274,7 +274,7 @@
 
         try
         {
-            if( page instanceof Attachment )
+            if( page.isAttachment() )
             {
                 res = getAttachmentDescription( (WikiPage)page );
             }
@@ -439,7 +439,7 @@
      *  @param feed A Feed to generate the feed to.
      *  @return feed.getString().
      */
-    protected String generateFullWikiRSS( WikiContext wikiContext, Feed feed )
+    protected String generateFullWikiRSS( WikiContext wikiContext, Feed feed ) throws ProviderException
     {
         feed.setChannelTitle( m_engine.getApplicationName() );
         feed.setFeedURL( m_engine.getBaseURL() );
@@ -471,7 +471,7 @@
 
             String url;
 
-            if( page instanceof Attachment )
+            if( page.isAttachment() )
             {
                 url = m_engine.getURL( WikiContext.ATTACH,
                                        page.getName(),
@@ -506,7 +506,8 @@
      * @return the RSS representation of the wiki context
      */
     @SuppressWarnings("unchecked")
-    protected String generateWikiPageRSS( WikiContext wikiContext, List changed, Feed feed )
+    protected String generateWikiPageRSS( WikiContext wikiContext, List changed, Feed feed ) 
+        throws ProviderException
     {
         feed.setChannelTitle( m_engine.getApplicationName()+": "+wikiContext.getPage().getName() );
         feed.setFeedURL( wikiContext.getViewURL( wikiContext.getPage().getName() ) );
@@ -537,7 +538,7 @@
 
             String url;
 
-            if( page instanceof Attachment )
+            if( page.isAttachment() )
             {
                 url = m_engine.getURL( WikiContext.ATTACH,
                                        page.getName(),
@@ -621,7 +622,7 @@
 
             String url;
 
-            if( page instanceof Attachment )
+            if( page.isAttachment() )
             {
                 url = m_engine.getURL( WikiContext.ATTACH,
                                        page.getName(),

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/search/LuceneSearchProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/search/LuceneSearchProvider.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/search/LuceneSearchProvider.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/search/LuceneSearchProvider.java Mon Apr 13 15:12:09 2009
@@ -500,7 +500,7 @@
      *
      *  @param page WikiPage to add to the update queue.
      */
-    public void reindexPage( WikiPage page )
+    public void reindexPage( WikiPage page ) throws ProviderException
     {
         if( page != null )
         {
@@ -508,24 +508,20 @@
 
             // TODO: Think if this was better done in the thread itself?
 
-            if( page instanceof Attachment )
+            if( page.isAttachment() )
             {
                 text = getAttachmentContent( (Attachment) page );
             }
             else
             {
-                text = m_engine.getPureText( page );
+                text = page.getContentAsString();
             }
 
-            if( text != null )
-            {
-                // Add work item to m_updates queue.
-                Object[] pair = new Object[2];
-                pair[0] = page;
-                pair[1] = text;
-                m_updates.add(pair);
-                log.debug("Scheduling page " + page.getName() + " for index update");
-            }
+            Object[] pair = new Object[2];
+            pair[0] = page;
+            pair[1] = text;
+            m_updates.add(pair);
+            log.debug("Scheduling page " + page.getName() + " for index update");
         }
     }
 
@@ -595,7 +591,7 @@
                 try
                 {
                     page = m_engine.getPage(pageName, WikiPageProvider.LATEST_VERSION);
-                    if(page instanceof Attachment)
+                    if(page.isAttachment())
                     {
                         // Currently attachments don't look nice on the search-results page
                         // When the search-results are cleaned up this can be enabled again.

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchManager.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchManager.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchManager.java Mon Apr 13 15:12:09 2009
@@ -324,7 +324,14 @@
      */
     public void pageRemoved(WikiPage page)
     {
-        m_searchProvider.pageRemoved(page);
+        try
+        {
+            m_searchProvider.pageRemoved(page);
+        }
+        catch( ProviderException e )
+        {
+            log.error("Unable to remove page from Search index",e);
+        }
     }
 
     /**
@@ -363,7 +370,14 @@
      */
     public void reindexPage(WikiPage page)
     {
-        m_searchProvider.reindexPage(page);
+        try
+        {
+            m_searchProvider.reindexPage(page);
+        }
+        catch( ProviderException e )
+        {
+            log.error( "Unable to index page", e );
+        }
     }
 
     /**

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchProvider.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchProvider.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/search/SearchProvider.java Mon Apr 13 15:12:09 2009
@@ -40,7 +40,7 @@
      * Delete a page from the search index
      * @param page Page to remove from search index
      */
-    public void pageRemoved(WikiPage page);
+    public void pageRemoved(WikiPage page) throws ProviderException;
 
     /**
      *  Adds a WikiPage for indexing queue.  This is called a queue, since
@@ -48,8 +48,9 @@
      *  be done in a separate thread.
      *
      *  @param page The WikiPage to be indexed.
+     *  @throws ProviderException If the page could not be indexed for some reason. 
      */
-    public void reindexPage(WikiPage page);
+    public void reindexPage(WikiPage page) throws ProviderException;
 
     /**
      * Search for pages matching a search query

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkTag.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkTag.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkTag.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkTag.java Mon Apr 13 15:12:09 2009
@@ -289,7 +289,7 @@
 
             parms = addParamsForRecipient( parms, m_containedParams );
 
-            if( p instanceof Attachment )
+            if( p.isAttachment() )
             {
                 String ctx = m_context;
                 // Switch context appropriately when attempting to view an

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkToParentTag.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkToParentTag.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkToParentTag.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkToParentTag.java Mon Apr 13 15:12:09 2009
@@ -57,7 +57,7 @@
         //  We just simply set the page to be our parent page
         //  and call the superclass.
         //
-        if( p instanceof Attachment )
+        if( p.isAttachment() )
         {
             setPage( p.getParent().getName() );
         }

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkToTag.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkToTag.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkToTag.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/LinkToTag.java Mon Apr 13 15:12:09 2009
@@ -95,7 +95,7 @@
             {
                 pageName = p.getName();
 
-                isattachment = p instanceof Attachment;
+                isattachment = p.isAttachment();
             }
             else
             {

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/PageTypeTag.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/PageTypeTag.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/PageTypeTag.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/PageTypeTag.java Mon Apr 13 15:12:09 2009
@@ -24,6 +24,7 @@
 
 import org.apache.wiki.api.WikiPage;
 import org.apache.wiki.attachment.Attachment;
+import org.apache.wiki.providers.ProviderException;
 
 
 /**
@@ -55,23 +56,23 @@
     }
 
     public final int doWikiStartTag()
-        throws IOException
+        throws IOException,ProviderException
     {
         WikiPage   page   = m_wikiContext.getPage();
 
         if( page != null )
         {
-            if( m_type.equals("attachment") && page instanceof Attachment )
+            if( m_type.equals("attachment") && page.isAttachment() )
             {
                 return EVAL_BODY_INCLUDE;
             }
             
-            if( m_type.equals("page") && !(page instanceof Attachment) )
+            if( m_type.equals("page") && !(page.isAttachment()) )
             {
                 return EVAL_BODY_INCLUDE;
             }
 
-            if( m_type.equals("weblogentry") && !(page instanceof Attachment) && page.getName().indexOf("_blogentry_") != -1 )
+            if( m_type.equals("weblogentry") && !(page.isAttachment()) && page.getName().indexOf("_blogentry_") != -1 )
             {
                 return EVAL_BODY_INCLUDE;
             }

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/ParentPageNameTag.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/ParentPageNameTag.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/ParentPageNameTag.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/ParentPageNameTag.java Mon Apr 13 15:12:09 2009
@@ -52,7 +52,7 @@
 
         if( page != null )
         {
-            if( page instanceof Attachment )
+            if( page.isAttachment() )
             {
                 pageContext.getOut().print( engine.beautifyTitle( page.getParent().getName()) );
             }

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandler.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandler.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandler.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandler.java Mon Apr 13 15:12:09 2009
@@ -109,9 +109,16 @@
 
         for( WikiPage p : pages )
         {
-            if( !(p instanceof Attachment) )
+            try
             {
-                result.add( toRPCString(p.getName()) );
+                if( !(p.isAttachment()) )
+                {
+                    result.add( toRPCString(p.getName()) );
+                }
+            }
+            catch( ProviderException e )
+            {
+                // We ignore these exceptions. Don't know whether we really should.
             }
         }
 
@@ -172,9 +179,16 @@
 
         for( WikiPage page : pages )
         {
-            if( page.getLastModified().after( since ) && !(page instanceof Attachment) )
+            try
+            {
+                if( page.getLastModified().after( since ) && !(page.isAttachment()) )
+                {
+                    result.add( encodeWikiPage( page ) );
+                }
+            }
+            catch( ProviderException e )
             {
-                result.add( encodeWikiPage( page ) );
+                // We ignore these.
             }
         }
 

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java Mon Apr 13 15:12:09 2009
@@ -62,10 +62,14 @@
         {
             WikiPage p = (WikiPage) i.next();
 
-            if( !(p instanceof Attachment) )
+            try
             {
-                result.add( p.getName() );
+                if( !(p.isAttachment()) )
+                {
+                    result.add( p.getName() );
+                }
             }
+            catch( ProviderException e ) {}
         }
 
         return result;
@@ -128,10 +132,14 @@
         {
             WikiPage page = (WikiPage)i.next();
 
-            if( page.getLastModified().after( since ) && !(page instanceof Attachment) )
+            try
             {
-                result.add( encodeWikiPage( page ) );
+                if( page.getLastModified().after( since ) && !(page.isAttachment()) )
+                {
+                    result.add( encodeWikiPage( page ) );
+                }
             }
+            catch( ProviderException e ) {}
         }
 
         return result;

Modified: incubator/jspwiki/trunk/tests/java/org/apache/wiki/content/EnglishPluralsPageNameResolverTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/content/EnglishPluralsPageNameResolverTest.java?rev=764499&r1=764498&r2=764499&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/java/org/apache/wiki/content/EnglishPluralsPageNameResolverTest.java (original)
+++ incubator/jspwiki/trunk/tests/java/org/apache/wiki/content/EnglishPluralsPageNameResolverTest.java Mon Apr 13 15:12:09 2009
@@ -57,19 +57,19 @@
     {
         WikiPath page;
         page = resolver.resolve( WikiPath.valueOf("SinglePage") );
-        assertEquals( "SinglePage", page );
+        assertEquals( "Main:SinglePage", page.toString() );
         
         page = resolver.resolve( WikiPath.valueOf("SinglePages") );
-        assertEquals( "SinglePage", page );
+        assertEquals( "Main:SinglePage", page.toString() );
         
         page = resolver.resolve( WikiPath.valueOf("PluralPages") );
-        assertEquals( "PluralPages", page );
+        assertEquals( "Main:PluralPages", page.toString() );
         
         page = resolver.resolve( WikiPath.valueOf( "PluralPage" ) );
-        assertEquals( "PluralPages", page );
+        assertEquals( "Main:PluralPages", page.toString() );
         
         page = resolver.resolve( WikiPath.valueOf("NonExistentPage") );
-        assertNull( page );
+        assertEquals( "Main:NonExistentPage", page.toString() );
     }
 
     public static Test suite()