You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by eg...@apache.org on 2003/11/03 18:49:39 UTC
cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication/xsp DocumentReferencesHelper.java
egli 2003/11/03 09:49:39
Modified: src/java/org/apache/lenya/cms/publication/xsp
DocumentReferencesHelper.java
Log:
Prevent a NullPointerException in the case where the link has no
language.
Revision Changes Path
1.12 +8 -4 cocoon-lenya/src/java/org/apache/lenya/cms/publication/xsp/DocumentReferencesHelper.java
Index: DocumentReferencesHelper.java
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/xsp/DocumentReferencesHelper.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- DocumentReferencesHelper.java 31 Oct 2003 15:50:53 -0000 1.11
+++ DocumentReferencesHelper.java 3 Nov 2003 17:49:39 -0000 1.12
@@ -250,8 +250,12 @@
for (int i = 0; i < internalLinks.length; i++) {
String docId = internalLinks[i];
- // trim the leading '_'
- String language = internalLinksLanguages[i].substring(1);
+ String language = null;
+
+ if (internalLinksLanguages[i] != null) {
+ // trim the leading '_'
+ language = internalLinksLanguages[i].substring(1);
+ }
SiteTreeNode documentNode = sitetree.getNode(docId);
if (documentNode == null
|| documentNode.getLabel(language) == null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org