Author: jalkanen
Date: Mon Oct 26 21:32:28 2009
New Revision: 829981
URL: http://svn.apache.org/viewvc?rev=829981&view=rev
Log:
Removed some unnecessary code.
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=829981&r1=829980&r2=829981&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
Mon Oct 26 21:32:28 2009
@@ -1348,16 +1348,20 @@
WikiEngine engine = context.getEngine();
WikiPath fromPage = WikiPath.valueOf( renameFrom );
WikiPath toPage = WikiPath.valueOf( renameTo );
- if ( !engine.pageExists( fromPage.toString() ) )
- {
- // TODO: Should localize this
- throw new WikiException("Cannot rename: source page
'"+fromPage.toString() + "' does not exist." );
- }
- if ( engine.pageExists( toPage.toString() ) )
- {
- // TODO: Should localize this
- throw new WikiException("Cannot rename: destination page
'"+toPage.toString() + "' already exists." );
- }
+
+ // TODO: This is unnecessary; move() should throw an exception
+// if ( !engine.pageExists( fromPage.toString() ) )
+// {
+// // TODO: Should localize this
+// throw new WikiException("Cannot rename: source page
'"+fromPage.toString() + "' does not exist." );
+// }
+//
+ // TODO: Unnecessary, move() will check this
+// if ( engine.pageExists( toPage.toString() ) )
+// {
+// // TODO: Should localize this
+// throw new WikiException("Cannot rename: destination page
'"+toPage.toString() + "' already exists." );
+// }
//
// Do the actual rename by changing from the frompage to the topage,
including