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/06/11 14:16:12 UTC
cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/ac Identity.java
egli 2003/06/11 05:16:12
Modified: src/java/org/apache/lenya/cms/ac Identity.java
Log:
Make the comment field optional.
Revision Changes Path
1.12 +8 -3 cocoon-lenya/src/java/org/apache/lenya/cms/ac/Identity.java
Index: Identity.java
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/ac/Identity.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Identity.java 24 Apr 2003 13:52:37 -0000 1.11
+++ Identity.java 11 Jun 2003 12:16:12 -0000 1.12
@@ -91,9 +91,14 @@
encryptedPassword = passwordNode.getFirstChild().getNodeValue();
log.debug("Encrypted Password: " + encryptedPassword);
+ // the comment node is optional
Node commentNode = XPathAPI.selectSingleNode(doc, "/" + ROOT + "/comment");
- comment = commentNode.getFirstChild().getNodeValue();
- log.debug("Comment: " + comment);
+ if (commentNode != null) {
+ comment = commentNode.getFirstChild().getNodeValue();
+ log.debug("Comment: " + comment);
+ } else {
+ log.warn("IMLFile: " + doc.getLocalName() + " doesn't contain a comment field.");
+ }
NodeList groupNodes = XPathAPI.selectNodeList(doc, "/" + ROOT + "/groups/group");
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org