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,
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.