|
|
Choosing A Webhost: |
svn commit: r432626 - /lenya/trunk/src/modules/sitetree/java/src/org/apache: msg#00209cms.lenya.cvs
Author: andreas Date: Fri Aug 18 09:16:38 2006 New Revision: 432626 URL: http://svn.apache.org/viewvc?rev=432626&view=rev Log: Don't use non-existing nodes in TreeSiteManager.getAvailableLocator() Modified: lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree/TreeSiteManager.java Modified: lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree/TreeSiteManager.java URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree/TreeSiteManager.java?rev=432626&r1=432625&r2=432626&view=diff ============================================================================== --- lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree/TreeSiteManager.java (original) +++ lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree/TreeSiteManager.java Fri Aug 18 09:16:38 2006 @@ -427,12 +427,11 @@ } SiteTree tree = getTree(factory, pub, locator.getArea()); - SiteTreeNode node = (SiteTreeNode) tree.getNode(path); String suffix = null; int version = 0; String idwithoutsuffix = null; - if (node != null) { + if (tree.contains(path)) { int n = path.lastIndexOf("/"); String lastToken = ""; String substring = path; @@ -451,10 +450,9 @@ idwithoutsuffix = substring + lastToken; } - while (node != null) { + while (tree.contains(path)) { version = version + 1; path = idwithoutsuffix + "-" + version; - node = (SiteTreeNode) tree.getNode(path); } }
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |