Projects tigase _server tigase-utils Issues #22
Constructor of tigase.form.Field has bug with checking "value" element (#22)
wojciech.kapcia@tigase.net opened 4 years ago

tigase.form.Field#Field(tigase.xml.Element)

if (fieldElement.getChildren() != null) {
	for (Element element : fieldElement.getChildren()) {
		if ("value".equals(element.getName())) {
			String v = element.getCData();

			if (v != null) {
				valueList.add(v);
			}
		} else if ("value".equals(element.getName())) {
			optionsLabelList.add(element.getAttributeStaticStr("label"));

			Element v = element.getChild("value");

			optionsValueList.add(v.getCData());
		}
	}
}

Check "value".equals(element.getName() is done twice (in "else if" as well)

wojciech.kapcia@tigase.net commented 4 years ago

Add test case, asked for Source Code Disclaimer in PR: https://github.com/tigase/tigase-utils/pull/1

issue 1 of 1
Type
Bug
Priority
Minor
Assignee
Version
tigase-server-8.1.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-utils#22
Please wait...
Page is in error, reload to recover