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 2007/06/25 13:55:02 UTC
svn commit: r550461 -
/lenya/trunk/src/java/org/apache/lenya/cms/publication/URLInformation.java
Author: andreas
Date: Mon Jun 25 04:55:02 2007
New Revision: 550461
URL: http://svn.apache.org/viewvc?view=rev&rev=550461
Log:
URLInformation: avoid NPE for '/' URLs
Modified:
lenya/trunk/src/java/org/apache/lenya/cms/publication/URLInformation.java
Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/URLInformation.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/publication/URLInformation.java?view=diff&rev=550461&r1=550460&r2=550461
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/URLInformation.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/URLInformation.java Mon Jun 25 04:55:02 2007
@@ -53,8 +53,9 @@
* @return A string.
*/
public String getCompleteArea() {
- if (this.completeArea == null) {
- String pubUrl = this.url.substring(getPublicationId().length());
+ String pubId = getPublicationId();
+ if (this.completeArea == null && pubId != null) {
+ String pubUrl = this.url.substring(pubId.length());
if (pubUrl.startsWith("/")) {
this.completeArea = extractBeforeSlash(pubUrl.substring(1));
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org