You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by aj...@apache.org on 2010/02/12 05:36:50 UTC
svn commit: r909227 - in /incubator/jspwiki/trunk: ./
src/WebContent/templates/default/ src/java/org/apache/wiki/
src/java/org/apache/wiki/util/ tests/java/org/apache/wiki/action/
Author: ajaquith
Date: Fri Feb 12 04:36:50 2010
New Revision: 909227
URL: http://svn.apache.org/viewvc?rev=909227&view=rev
Log:
Fixed some minor bugs and a few failing unit tests.
Modified:
incubator/jspwiki/trunk/ChangeLog
incubator/jspwiki/trunk/src/WebContent/templates/default/Preferences.jsp
incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
incubator/jspwiki/trunk/src/java/org/apache/wiki/util/WikiBackgroundThread.java
incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/GroupActionBeanTest.java
incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/UserProfileActionBeanTest.java
Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=909227&r1=909226&r2=909227&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Fri Feb 12 04:36:50 2010
@@ -1,3 +1,21 @@
+2010-02-12 Andrew Jaquith <ajaquith AT apache DOT org>
+
+ * 3.0.0-svn-205
+
+ * Introduced TemplateResolution, which forwards the user to
+ the appropriate resource in /templates/<template>. It replaces
+ the use of ForwardResolution in most of the ActionBeans.
+ For example, to forward to a template JSP ("display JSP"),
+ you'd do this: new TemplateResolution( "PageInfo.jsp" ).
+ JSPWiki will figure out where the template JSP actually
+ is, and forward to the correct path.
+
+ * Fixed some minor bugs and a few failing unit tests.
+
+ * Removed two unnecessary JARs: jsp-api.jar and servlet-api.jar.
+ These don't seem to be needed, but please re-add them if I
+ am mistaken.
+
2010-02-07 Andrew Jaquith <ajaquith AT apache DOT org>
* 3.0.0-svn-204
Modified: incubator/jspwiki/trunk/src/WebContent/templates/default/Preferences.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/templates/default/Preferences.jsp?rev=909227&r1=909226&r2=909227&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/templates/default/Preferences.jsp (original)
+++ incubator/jspwiki/trunk/src/WebContent/templates/default/Preferences.jsp Fri Feb 12 04:36:50 2010
@@ -38,7 +38,6 @@
<wiki:Tab id="prefs" titleKey="prefs.tab.prefs" accesskey="p">
<h3><fmt:message key="prefs.heading"><fmt:param><wiki:Variable var="applicationname" /></fmt:param></fmt:message></h3>
<!-- Any messages or errors? -->
- <div class="instructions"><s:messages key="prefs" /></div>
<div class="errors"><s:errors beanclass="org.apache.wiki.action.UserPreferencesActionBean" globalErrorsOnly="true" /></div>
<div class="formcontainer">
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=909227&r1=909226&r2=909227&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java Fri Feb 12 04:36:50 2010
@@ -77,7 +77,7 @@
* <p>
* If the build identifier is empty, it is not added.
*/
- public static final String BUILD = "204";
+ public static final String BUILD = "205";
/**
* This is the generic version string you should use
Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/util/WikiBackgroundThread.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/util/WikiBackgroundThread.java?rev=909227&r1=909226&r2=909227&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/util/WikiBackgroundThread.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/util/WikiBackgroundThread.java Fri Feb 12 04:36:50 2010
@@ -106,6 +106,10 @@
server.invoke( timer, "stop", new Object[] {}, new String[] {} );
server.unregisterMBean( timer );
}
+ catch ( InstanceNotFoundException e )
+ {
+ // Swallow: Timer wasn't every registered for some reason.
+ }
catch( JMException e )
{
e.printStackTrace();
Modified: incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/GroupActionBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/GroupActionBeanTest.java?rev=909227&r1=909226&r2=909227&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/GroupActionBeanTest.java (original)
+++ incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/GroupActionBeanTest.java Fri Feb 12 04:36:50 2010
@@ -242,7 +242,7 @@
GroupActionBean bean = trip.getActionBean( GroupActionBean.class );
ValidationErrors errors = bean.getContext().getValidationErrors();
assertEquals( 0, errors.size() );
- assertEquals( "/Login.jsp", trip.getDestination().substring( 0, 13 ) );
+ assertEquals( "/Login.jsp", trip.getDestination().substring( 0, 10 ) );
// Try saving again, this time authenticated
trip = m_engine.authenticatedTrip( Users.JANNE, Users.JANNE_PASS, GroupActionBean.class );
@@ -255,7 +255,7 @@
bean = trip.getActionBean( GroupActionBean.class );
errors = bean.getContext().getValidationErrors();
assertEquals( 0, errors.size() );
- assertEquals( "/Group.action?view=&group=TestSaveNewGroup", trip.getDestination() );
+ assertEquals( "/Group.jsp?view=&group=TestSaveNewGroup", trip.getDestination() );
// Verify the Group members were set on the Actionbean correctly (sorted!)
List<Principal> members = bean.getMembers();
Modified: incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/UserProfileActionBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/UserProfileActionBeanTest.java?rev=909227&r1=909226&r2=909227&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/UserProfileActionBeanTest.java (original)
+++ incubator/jspwiki/trunk/tests/java/org/apache/wiki/action/UserProfileActionBeanTest.java Fri Feb 12 04:36:50 2010
@@ -246,6 +246,7 @@
trip.setParameter( "profile.email", "fred@friendly.org" );
trip.setParameter( "profile.password", "mypassword" );
trip.setParameter( "passwordAgain", "mypassword" );
+ TestEngine.addSpamProtectParams( trip );
trip.execute( "save" );
bean = trip.getActionBean( UserProfileActionBean.class );
errors = bean.getContext().getValidationErrors();
@@ -281,6 +282,7 @@
trip.setParameter( "profile.email", "fred1@friendly.org" );
trip.setParameter( "profile.password", "mypassword" );
trip.setParameter( "passwordAgain", "mypassword" );
+ TestEngine.addSpamProtectParams( trip );
trip.execute( "save" );
bean = trip.getActionBean( UserProfileActionBean.class );
// Check to make sure no validation errors here...
@@ -299,6 +301,7 @@
trip.setParameter( "profile.email", "fred2@friendly.org" );
trip.setParameter( "profile.password", "mypassword" );
trip.setParameter( "passwordAgain", "mypassword" );
+ TestEngine.addSpamProtectParams( trip );
trip.execute( "save" );
bean = trip.getActionBean( UserProfileActionBean.class );
// Check to make sure all our expected validation errors are here...
@@ -316,6 +319,7 @@
trip.setParameter( "profile.email", "fred2@friendly.org" );
trip.setParameter( "profile.password", "mypassword" );
trip.setParameter( "passwordAgain", "mypassword" );
+ TestEngine.addSpamProtectParams( trip );
trip.execute( "save" );
bean = trip.getActionBean( UserProfileActionBean.class );
// Check to make sure all our expected validation errors are here...
@@ -343,6 +347,7 @@
trip.setParameter( "profile.email", "fred1@friendly.org" );
trip.setParameter( "profile.password", "mypassword" );
trip.setParameter( "passwordAgain", "mypassword" );
+ TestEngine.addSpamProtectParams( trip );
trip.execute( "save" );
bean = trip.getActionBean( UserProfileActionBean.class );
errors = bean.getContext().getValidationErrors();
@@ -376,6 +381,7 @@
trip.addParameter( "profile.loginName", "wilma" );
trip.addParameter( "profile.fullname", "Wilma Flintstone" );
trip.addParameter( "profile.email", "wilma@flintstone.org" );
+ TestEngine.addSpamProtectParams( trip );
trip.execute( "save" );
bean = trip.getActionBean( UserProfileActionBean.class );
assertEquals( "wilma", bean.getProfile().getLoginName() );