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 2006/11/15 00:03:38 UTC
svn commit: r475040 - in /lenya/trunk/src/impl:
java/org/apache/lenya/cms/publication/PublicationConfiguration.java
test/org/apache/lenya/cms/publication/PublicationTest.java
Author: andreas
Date: Tue Nov 14 15:03:37 2006
New Revision: 475040
URL: http://svn.apache.org/viewvc?view=rev&rev=475040
Log:
Don't fail test if publication content dir doesn't exist
Modified:
lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java
lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java
Modified: lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java?view=diff&rev=475040&r1=475039&r2=475040
==============================================================================
--- lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java (original)
+++ lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java Tue Nov 14 15:03:37 2006
@@ -76,7 +76,8 @@
* Creates a new instance of Publication
* @param _id the publication id
* @param servletContextPath the servlet context of this publication
- * @throws PublicationException if there was a problem reading the config file
+ * @throws PublicationException if there was a problem reading the config
+ * file
*/
protected PublicationConfiguration(String _id, String servletContextPath)
throws PublicationException {
@@ -303,8 +304,8 @@
}
/**
- * Get the breadcrumb prefix. It can be used as a prefix if a publication is part of a larger
- * site
+ * Get the breadcrumb prefix. It can be used as a prefix if a publication is
+ * part of a larger site
* @return the breadcrumb prefix
*/
public String getBreadcrumbPrefix() {
@@ -375,7 +376,8 @@
}
/**
- * @see org.apache.lenya.cms.publication.Publication#getProxy(java.lang.String, boolean)
+ * @see org.apache.lenya.cms.publication.Publication#getProxy(java.lang.String,
+ * boolean)
*/
public Proxy getProxy(String area, boolean isSslProtected) {
loadConfiguration();
@@ -484,11 +486,12 @@
return file.isDirectory() && !name.equals("rcml") && !name.equals("rcbak");
}
});
- if (directories != null) {
- this.areas = new String[directories.length];
- for (int i = 0; i < directories.length; i++) {
- this.areas[i] = directories[i].getName();
- }
+ if (directories == null) {
+ directories = new File[0];
+ }
+ this.areas = new String[directories.length];
+ for (int i = 0; i < directories.length; i++) {
+ this.areas[i] = directories[i].getName();
}
}
return this.areas;
Modified: lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java?view=diff&rev=475040&r1=475039&r2=475040
==============================================================================
--- lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java (original)
+++ lenya/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java Tue Nov 14 15:03:37 2006
@@ -59,12 +59,10 @@
assertNotNull(contentDirPath);
File contentDir = new File(contentDirPath);
- assertTrue(contentDir.isDirectory());
assertTrue(pub.exists());
String[] areaNames = pub.getAreaNames();
- assertTrue(pub.getAreaNames().length > 0);
for (int i = 0; i < areaNames.length; i++) {
File areaContentDir = pub.getContentDirectory(areaNames[i]);
assertTrue(areaContentDir.isDirectory());
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org