Hi Chris,
not really because this was really a small bug that I found - do we
need to file tickets for every single commit ? (if so, no problem).
I do have some bigger items coming up that need Jira tickets, in-fact I'll file
these soon.
thanks, Luca
On May 29, 2012, at 8:34 PM, Mattmann, Chris A (388J) wrote:
> Hey Luca,
>
> Did you file an issue in JIRA for the below or was it related to one?
>
> Thanks,
> Chris
>
> On May 29, 2012, at 9:39 AM, <[email protected]>
> <[email protected]> wrote:
>
>> Author: luca
>> Date: Tue May 29 16:39:34 2012
>> New Revision: 1343834
>>
>> URL: http://svn.apache.org/viewvc?rev=1343834&view=rev
>> Log:
>> Protecting metadata extraction versus attributes that are containers
>>
>> Modified:
>>
>> oodt/trunk/opendapps/src/main/java/org/apache/oodt/opendapps/OpendapProfileElementExtractor.java
>>
>> Modified:
>> oodt/trunk/opendapps/src/main/java/org/apache/oodt/opendapps/OpendapProfileElementExtractor.java
>> URL:
>> http://svn.apache.org/viewvc/oodt/trunk/opendapps/src/main/java/org/apache/oodt/opendapps/OpendapProfileElementExtractor.java?rev=1343834&r1=1343833&r2=1343834&view=diff
>> ==============================================================================
>> ---
>> oodt/trunk/opendapps/src/main/java/org/apache/oodt/opendapps/OpendapProfileElementExtractor.java
>> (original)
>> +++
>> oodt/trunk/opendapps/src/main/java/org/apache/oodt/opendapps/OpendapProfileElementExtractor.java
>> Tue May 29 16:39:34 2012
>> @@ -68,32 +68,38 @@ public class OpendapProfileElementExtrac
>> while (attributeNames.hasMoreElements()) {
>> String attrName = (String) attributeNames.nextElement();
>> Attribute attr = attTable.getAttribute(attrName);
>> - Enumeration attrValues = null;
>> - try {
>> - attrValues = attr.getValues();
>> - } catch (NoSuchAttributeException e) {
>> - e.printStackTrace();
>> - LOG.log(Level.WARNING, "Attempt to resolve attribute: [" + attrName
>> - + "] failed: Message: " + e.getMessage());
>> - continue;
>> - }
>> -
>> - while (attrValues.hasMoreElements()) {
>> - String attrValue = (String) attrValues.nextElement();
>> - if (attrName.equals(ACTUAL_RANGE)) {
>> - elem.setMinValue(attrValue);
>> - if (attrValues.hasMoreElements()) {
>> - elem.setMaxValue((String) attrValues.nextElement());
>> +
>> + if (!attr.isContainer()) {
>> + Enumeration attrValues = null;
>> +
>> + try {
>> + attrValues = attr.getValues();
>> + } catch (NoSuchAttributeException e) {
>> + e.printStackTrace();
>> + LOG.log(Level.WARNING, "Attempt to resolve attribute: [" +
>> attrName
>> + + "] failed: Message: " + e.getMessage());
>> + continue;
>> + }
>> +
>> + while (attrValues.hasMoreElements()) {
>> + String attrValue = (String) attrValues.nextElement();
>> + if (attrName.equals(ACTUAL_RANGE)) {
>> + elem.setMinValue(attrValue);
>> + if (attrValues.hasMoreElements()) {
>> + elem.setMaxValue((String) attrValues.nextElement());
>> + }
>> + } else if (attrName.equals(UNITS)) {
>> + elem.setUnit(attrValue);
>> + } else if (attrName.equals(START)) {
>> + elem.setMinValue(attrValue);
>> + } else if (attrName.equals(END)) {
>> + elem.setMaxValue(attrValue);
>> }
>> - } else if (attrName.equals(UNITS)) {
>> - elem.setUnit(attrValue);
>> - } else if (attrName.equals(START)) {
>> - elem.setMinValue(attrValue);
>> - } else if (attrName.equals(END)) {
>> - elem.setMaxValue(attrValue);
>> }
>> }
>> - }
>> +
>> + } // not a container attribute
>> +
>> return elem;
>> }
>>
>>
>>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Chris Mattmann, Ph.D.
> Senior Computer Scientist
> NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
> Office: 171-266B, Mailstop: 171-246
> Email: [email protected]
> WWW: http://sunset.usc.edu/~mattmann/
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Adjunct Assistant Professor, Computer Science Department
> University of Southern California, Los Angeles, CA 90089 USA
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>