-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10095/
-----------------------------------------------------------
Review request for oodt and Chris Mattmann.
Description
-------
The readTags method in org.apache.oodt.cas.product.rss.RSSConfigReader assumes
that org.w3c.dom.Element.getAttribute(java.lang.String) will return null if a
tag does not have a 'source' attribute definition in the RSS configuration
file. Instead the getAttribute method returns an empty String. This means
that by default readTags will give every tag a blank source attribute.
We could use the org.w3c.dom.Element.getAttributeNode(java.lang.String)
instead. This method takes the attribute name as a String argument and returns
null if the attribute does not exist for the element. With this change, if any
tags in the RSS configuration file have an explicitly defined empty source
attribute (e.g. <tag name="example" source=""/>), readTags will add the empty
source attribute to the attribute list for the tag. But if a tag does not have
an explicit source attribute definition, readTags will no longer create a blank
source attribute for the tag.
This addresses bug OODT-582.
https://issues.apache.org/jira/browse/OODT-582
Diffs
-----
/trunk/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSConfigReader.java
1460085
Diff: https://reviews.apache.org/r/10095/diff/
Testing
-------
I implemented a new JUnit test class RSSConfigReaderTest to test for this bug.
Please see OODT-583 for details of the test class.
Thanks,
Ross Laidlaw