jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaqu...@apache.org
Subject svn commit: r919821 - /incubator/jspwiki/trunk/src/java/org/apache/wiki/content/ContentManager.java
Date Sat, 06 Mar 2010 19:15:19 GMT
Author: ajaquith
Date: Sat Mar  6 19:15:19 2010
New Revision: 919821

URL: http://svn.apache.org/viewvc?rev=919821&view=rev
Log:
Fixed bug that caused ReferenceManager tests to fail.

Modified:
    incubator/jspwiki/trunk/src/java/org/apache/wiki/content/ContentManager.java

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/content/ContentManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/content/ContentManager.java?rev=919821&r1=919820&r2=919821&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/content/ContentManager.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/content/ContentManager.java Sat Mar 
6 19:15:19 2010
@@ -1333,15 +1333,7 @@
             catch( PageNotFoundException e )
             {
                 // Doesn't exist? No problem. Time to make one.
-                try
-                {
-                    page = engine.getContentManager().addPage( name, ContentManager.JSPWIKI_CONTENT_TYPE
);
-                }
-                catch( PageAlreadyExistsException pae )
-                {
-                    // This should never happen, but it if does, throw a big honking exception
-                    throw new WikiException( "We were just told the page didn't exist. Now
it does? Explain that please...", pae );
-                }
+                page = engine.getContentManager().addPage( name, getJCRPath( name), ContentManager.JSPWIKI_CONTENT_TYPE
);
             }
             
             // Retrieve the page ACL, author, attributes, modified-date, name and new text
from the workflow
@@ -1512,10 +1504,10 @@
     {
         String spaceName;
         String spacePath;
-        
+
         spaceName = wikiName.getSpace().toLowerCase();
         spacePath = wikiName.getPath().toLowerCase();
-               
+
         return "/"+JCR_PAGES_NODE+"/"+spaceName+"/"+spacePath;
     }
 
@@ -1645,10 +1637,8 @@
         try
         {
             Session session = m_sessionManager.getSession();
-        
             Node nd = session.getRootNode().getNode( getJCRPath(path) );
-            JCRWikiPage page = new JCRWikiPage(m_engine, nd);
-            
+            JCRWikiPage page = new JCRWikiPage(m_engine, path, nd);
             return page;
         }
         catch( PathNotFoundException e )
@@ -1659,10 +1649,6 @@
         {
             throw new ProviderException( "Unable to get a page", e );
         }
-        catch( WikiException e )
-        {
-            throw new ProviderException("Unable to get a  page",e);
-        }
     }
 
     /**



Mime
View raw message