jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaqu...@apache.org
Subject svn commit: r832652 - in /incubator/jspwiki/trunk: ./ src/WebContent/WEB-INF/lib/ src/java/org/apache/wiki/ src/java/org/apache/wiki/action/ tests/java/org/apache/wiki/action/ tests/java/org/apache/wiki/ui/stripes/
Date Wed, 04 Nov 2009 03:17:43 GMT
Author: ajaquith
Date: Wed Nov  4 03:17:42 2009
New Revision: 832652

URL: http://svn.apache.org/viewvc?rev=832652&view=rev
Log:
Fixed bug causing concatenation of edited page text. Root cause: over-eager use of flash-scope
in EditActionBean. Upgraded Stripes to 1.6-beta.

Added:
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/lib/stripes-1.6-svn-1193.jar   (with props)
Removed:
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/lib/stripes-1.5.2-beta.jar
Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java
    incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/EditActionBeanTest.java
    incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/stripes/ShortUrlRedirectFilterTest.java

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=832652&r1=832651&r2=832652&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Wed Nov  4 03:17:42 2009
@@ -1,3 +1,11 @@
+2009-11-03 Andrew Jaquith <ajaquith AT apache DOT org>
+
+        * 3.0.0-svn-177
+
+        * Fixed bug causing concatenation of edited page text.
+        Root cause: over-eager use of flash-scope in EditActionBean.
+        Upgraded Stripes to 1.6-beta.
+
 2009-11-01 Andrew Jaquith <ajaquith AT apache DOT org>
 
         * 3.0.0-svn-176

Added: incubator/jspwiki/trunk/src/WebContent/WEB-INF/lib/stripes-1.6-svn-1193.jar
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/lib/stripes-1.6-svn-1193.jar?rev=832652&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/jspwiki/trunk/src/WebContent/WEB-INF/lib/stripes-1.6-svn-1193.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java?rev=832652&r1=832651&r2=832652&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java Wed Nov  4 03:17:42 2009
@@ -77,7 +77,7 @@
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "176";
+    public static final String     BUILD         = "177";
 
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java?rev=832652&r1=832651&r2=832652&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java Wed Nov  4
03:17:42 2009
@@ -530,10 +530,7 @@
         }
         catch( RedirectException ex )
         {
-            // Should work, but doesn't
-            wikiContext.getWikiSession().addMessage( ex.getMessage() ); // FIXME:
-            session.setAttribute( "message", ex.getMessage() );
-            return new RedirectResolution( ex.getRedirect() ).flash( this );
+            throw new WikiException("Strange redirection: " + ex.getMessage(), ex);
         }
 
         return new RedirectResolution( ViewActionBean.class, "view" ).addParameter( "page",
pagereq );

Modified: incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/EditActionBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/EditActionBeanTest.java?rev=832652&r1=832651&r2=832652&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/EditActionBeanTest.java (original)
+++ incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/EditActionBeanTest.java Wed
Nov  4 03:17:42 2009
@@ -133,9 +133,26 @@
         ValidationErrors errors = trip.getValidationErrors();
         assertEquals( 0, errors.size() );
         assertEquals( page, bean.getPage() );
+        assertEquals( "This is the edited text\r\n", page.getContentAsString() );
 
         // ...and the destination should be Wiki.action (aka display JSP)
         assertEquals( "/Wiki.action?view=&page=" + pageName, trip.getDestination() );
+        
+        // Save the page one more time!
+        trip = m_engine.guestTrip( "/Edit.action" );
+        trip.setParameter( "page", pageName );
+        startTime = String.valueOf( System.currentTimeMillis() );
+        trip.addParameter( "startTime", CryptoUtil.encrypt( startTime ) );
+        trip.addParameter( "text", "This is the third revision." );
+        TestEngine.addSpamProtectParams( trip );
+        trip.execute( "save" );
+        
+        // ...and the text should again be the same as our revision
+        bean = trip.getActionBean( EditActionBean.class );
+        errors = trip.getValidationErrors();
+        assertEquals( 0, errors.size() );
+        assertEquals( page, bean.getPage() );
+        assertEquals( "This is the third revision.\r\n", page.getContentAsString() );
 
         // Delete the test page
         m_engine.deletePage( pageName );

Modified: incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/stripes/ShortUrlRedirectFilterTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/stripes/ShortUrlRedirectFilterTest.java?rev=832652&r1=832651&r2=832652&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/stripes/ShortUrlRedirectFilterTest.java
(original)
+++ incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/stripes/ShortUrlRedirectFilterTest.java
Wed Nov  4 03:17:42 2009
@@ -47,12 +47,10 @@
         
         // Add extension classes
         Map<String,String> filterParams = new HashMap<String,String>();
-//        filterParams.put("ActionResolver.Class", "org.apache.wiki.ui.stripes.FileBasedActionResolver");
         filterParams.put("ActionResolver.Packages", "org.apache.wiki.action");
         filterParams.put("Extension.Packages", "org.apache.wiki.ui.stripes");
         filterParams.put( "ExceptionHandler.Class", "org.apache.wiki.ui.stripes.WikiExceptionHandler"
);
         servletContext.addFilter(StripesFilter.class, "StripesFilter", filterParams);
-
         servletContext.addFilter( ShortUrlRedirectFilter.class, "Redirect filter", null );
 
         // Set the configured servlet context



Mime
View raw message