Author: jalkanen
Date: Tue Dec  1 22:45:36 2009
New Revision: 885983

URL: http://svn.apache.org/viewvc?rev=885983&view=rev
Log:
No longer creates page in getJCRNode()

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

Modified: 
incubator/jspwiki/trunk/src/java/org/apache/wiki/content/jcr/JCRWikiPage.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/content/jcr/JCRWikiPage.java?rev=885983&r1=885982&r2=885983&view=diff
==============================================================================
--- 
incubator/jspwiki/trunk/src/java/org/apache/wiki/content/jcr/JCRWikiPage.java 
(original)
+++ 
incubator/jspwiki/trunk/src/java/org/apache/wiki/content/jcr/JCRWikiPage.java 
Tue Dec  1 22:45:36 2009
@@ -140,15 +140,9 @@
     public Node getJCRNode() throws RepositoryException
     {
         Node node;
-        try
-        {
-            node = m_engine.getContentManager().getJCRNode(m_jcrPath);
-        }
-        catch ( PathNotFoundException e )
-        {
-            // If the Node was never created, create one now
-            node = m_engine.getContentManager().createJCRNode( m_jcrPath );
-        }
+        
+        node = m_engine.getContentManager().getJCRNode(m_jcrPath);
+
         return node;
     }
     
@@ -515,7 +509,7 @@
     }
     
     /**
-     *  A page is equal to another page if its name and version are equal.
+     *  A page is equal to another page if its path and version are equal.
      *  
      *  {...@inheritdoc}
      */
@@ -525,7 +519,7 @@
         {
             WikiPage oo = (WikiPage) o;
         
-            if( oo.getName().equals( getName() ) )
+            if( oo.getPath().equals( getPath() ) )
             {
                 if( oo.getVersion() == getVersion() )
                 {


Reply via email to