Skip to content

Attributes.getValue(String qName) sometimes returns values from previous elements #80

Open
@nedtwigg

Description

@nedtwigg

I have an entity with no attributes. But getValue("SomeKey") is returning a value from a previous element.

I think the problem is that these lines

@Override
public String getValue(String qName)
{
int ix = getIndex(qName);
return (ix < 0) ? null : _attrCollector.getValue(ix);
}
@Override
public String getValue(String uri, String localName)
{
int ix = getIndex(uri, localName);
return (ix < 0) ? null : _attrCollector.getValue(ix);
}

Are missing the || index >= _attrCount that this has

@Override
public String getValue(int index)
{
return (index < 0 || index >= _attrCount) ? null :
_attrCollector.getValue(index);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions