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 2008/12/04 22:44:23 UTC
svn commit: r723455 - in
/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki:
WikiEngine.java WikiPage.java
Author: jalkanen
Date: Thu Dec 4 13:44:23 2008
New Revision: 723455
URL: http://svn.apache.org/viewvc?rev=723455&view=rev
Log:
Fixed an annoying NPE...
Modified:
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java?rev=723455&r1=723454&r2=723455&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java Thu Dec 4 13:44:23 2008
@@ -2133,7 +2133,7 @@
WikiActionBeanContext context = m_contextFactory.newContext( request, (HttpServletResponse)null, requestContext );
// Stash the action bean/wiki context, and return it!
- WikiContextFactory.saveContext( request, context );
+ WikiContextFactory.saveContext( context.getRequest(), context );
return context;
}
catch ( WikiException e )
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java?rev=723455&r1=723454&r2=723455&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java Thu Dec 4 13:44:23 2008
@@ -439,7 +439,10 @@
{
try
{
- m_node.save();
+ if( m_node.isNew() )
+ m_node.getParent().save();
+ else
+ m_node.save();
}
catch( RepositoryException e )
{