You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by rf...@apache.org on 2007/08/14 18:56:18 UTC

svn commit: r565835 - /lenya/trunk/src/modules/collection/java/src/org/apache/lenya/modules/collection/CollectionWrapper.java

Author: rfrovarp
Date: Tue Aug 14 09:56:17 2007
New Revision: 565835

URL: http://svn.apache.org/viewvc?view=rev&rev=565835
Log:
getAttributeNS() will never return null. It will return an empty string if the lookup fails, so I believe this is correct. The non-short circuiting or is confusing and I don't see the reason for it here. Change them back if I'm wrong.

Modified:
    lenya/trunk/src/modules/collection/java/src/org/apache/lenya/modules/collection/CollectionWrapper.java

Modified: lenya/trunk/src/modules/collection/java/src/org/apache/lenya/modules/collection/CollectionWrapper.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/collection/java/src/org/apache/lenya/modules/collection/CollectionWrapper.java?view=diff&rev=565835&r1=565834&r2=565835
==============================================================================
--- lenya/trunk/src/modules/collection/java/src/org/apache/lenya/modules/collection/CollectionWrapper.java (original)
+++ lenya/trunk/src/modules/collection/java/src/org/apache/lenya/modules/collection/CollectionWrapper.java Tue Aug 14 09:56:17 2007
@@ -189,8 +189,8 @@
      */
     protected void saveXml(NamespaceHelper helper) throws TransformerException, DocumentException {
         Element collectionElement = helper.getDocument().getDocumentElement();
-        if (collectionElement.getAttributeNS(null, ATTRIBUTE_UUID) == null
-                | collectionElement.getAttribute(ATTRIBUTE_UUID).equals("")) {
+        if (collectionElement.getAttributeNS(null, ATTRIBUTE_UUID).equals("")
+                || collectionElement.getAttribute(ATTRIBUTE_UUID).equals("")) {
             collectionElement.setAttributeNS(null, ATTRIBUTE_UUID, getDelegate().getUUID());
         }
         Element[] existingDocumentElements = helper.getChildren(collectionElement,



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org