It cannot return null. It returns an empty String when the attribute is
not present. Fixes a warning in XmlViewInfo
Change-Id: Ia4b3ee9ccc2990597cbba16c2d0d1e3349a78bec
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/62078
Reviewed-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@efficios.com>
--- /dev/null
+class org/w3c/dom/Element
+getAttribute
+ (Ljava/lang/String;)Ljava/lang/String;
+ (Ljava/lang/String;)L1java/lang/String;
if (childElements.size() == 1 && firstChild.getNodeName().equals(TmfXmlStrings.ELEMENT_FIELD)) {
String attribute = firstChild.getAttribute(TmfXmlStrings.NAME);
- if (attribute == null) {
- throw new IllegalArgumentException();
- }
fStateValue = modelFactory.createStateValue(stateValueElement, fContainer, attribute);
} else {
List<ITmfXmlStateAttribute> attributes = new ArrayList<>();
public TmfXmlEventHandler(ITmfXmlModelFactory modelFactory, Element node, IXmlStateSystemContainer parent) {
fParent = parent;
String name = node.getAttribute(TmfXmlStrings.HANDLER_EVENT_NAME);
- if (name == null) {
- throw new IllegalArgumentException();
- }
fName = name;
List<@NonNull Element> childElements = XmlUtils.getChildElements(node, TmfXmlStrings.STATE_CHANGE);
*/
public TmfXmlLocation(ITmfXmlModelFactory modelFactory, Element location, IXmlStateSystemContainer container) {
String id = location.getAttribute(TmfXmlStrings.ID);
- if (id == null) {
- throw new IllegalArgumentException();
- }
fId = id;
fContainer = container;