You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/01/31 22:32:42 UTC
svn commit: r617244 -
/lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java
Author: andreas
Date: Thu Jan 31 13:32:38 2008
New Revision: 617244
URL: http://svn.apache.org/viewvc?rev=617244&view=rev
Log:
Add assertions to AreaImpl.contains(), return false if uuid or area are empty strings.
Modified:
lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java
Modified: lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java?rev=617244&r1=617243&r2=617244&view=diff
==============================================================================
--- lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java (original)
+++ lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java Thu Jan 31 13:32:38 2008
@@ -30,6 +30,7 @@
import org.apache.lenya.cms.site.SiteManager;
import org.apache.lenya.cms.site.SiteNode;
import org.apache.lenya.cms.site.SiteStructure;
+import org.apache.lenya.util.Assert;
/**
* Area implementation.
@@ -56,6 +57,11 @@
}
public boolean contains(String uuid, String language) {
+ Assert.notNull("uuid", uuid);
+ Assert.notNull("language", language);
+ if (uuid.equals("") || language.equals("")) {
+ return false;
+ }
// check site structure first (performance)
if (getSite().containsByUuid(uuid, language)) {
return true;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org