jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaqu...@apache.org
Subject svn commit: r772040 - in /incubator/jspwiki/trunk: src/java/org/apache/wiki/xmlrpc/RPCHandler.java tests/java/org/apache/wiki/xmlrpc/RPCHandlerTest.java
Date Wed, 06 May 2009 03:11:41 GMT
Author: ajaquith
Date: Wed May  6 03:11:40 2009
New Revision: 772040

URL: http://svn.apache.org/viewvc?rev=772040&view=rev
Log:
Fixed bug in RPCHandler and test code that was causing a test to fail.

Modified:
    incubator/jspwiki/trunk/src/java/org/apache/wiki/xmlrpc/RPCHandler.java
    incubator/jspwiki/trunk/tests/java/org/apache/wiki/xmlrpc/RPCHandlerTest.java

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=772040&r1=772039&r2=772040&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 Wed May  6 03:11:40
2009
@@ -172,7 +172,7 @@
 
         for( WikiPage page : pages )
         {
-            if( !( page.isAttachment() ) && page.getLastModified().after( since )
)
+            if( !( page.isAttachment() ) && page.getLastModified() != null &&
page.getLastModified().after( since ) )
             {
                 result.add( encodeWikiPage( page ) );
             }

Modified: incubator/jspwiki/trunk/tests/java/org/apache/wiki/xmlrpc/RPCHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/xmlrpc/RPCHandlerTest.java?rev=772040&r1=772039&r2=772040&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/java/org/apache/wiki/xmlrpc/RPCHandlerTest.java (original)
+++ incubator/jspwiki/trunk/tests/java/org/apache/wiki/xmlrpc/RPCHandlerTest.java Wed May
 6 03:11:40 2009
@@ -51,9 +51,9 @@
         m_engine = new TestEngine( m_props );
 
         m_handler = new RPCHandler();
-        m_engine.deletePage( "Dummy" );
-        WikiContext ctx = m_engine.getWikiContextFactory().newViewContext( m_engine.createPage("Dummy")
);
-        m_handler.initialize( ctx );
+        WikiContext context = m_engine.getWikiContextFactory().newViewContext( m_engine.createPage(
"Dummy" ) );
+        m_handler.initialize( context );
+        m_engine.getContentManager().release();
     }
 
     public void tearDown() throws Exception
@@ -80,8 +80,10 @@
     public void testRecentChanges()
         throws Exception
     {
+        m_engine.emptyRepository();
         Date time = getCalendarTime( Calendar.getInstance().getTime() );
         Vector<Hashtable<String,Object>> previousChanges = m_handler.getRecentChanges(
time );
+        assertEquals( 0, previousChanges.size() );
 
         m_engine.saveText( NAME1, "Foo" );
         WikiPage directInfo = m_engine.getPage( NAME1 );



Mime
View raw message