potential null pointer in condition; AYAI9l8k5Irk9_td-cXb (#6237)

Co-authored-by: Daan Hoogland <dahn@onecht.net>
This commit is contained in:
dahn 2022-04-11 12:37:11 +02:00 committed by GitHub
parent e7071ec196
commit ee2ded8200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,7 @@ public class OVFParser {
Node value = childNodes.item(i);
// Also match if the child's name has a suffix:
// Example: <rasd:AllocationUnits>
if (value != null && (value.getNodeName().equals(childNodeName)) || value.getNodeName().endsWith(":" + childNodeName)) {
if (value != null && (value.getNodeName().equals(childNodeName) || value.getNodeName().endsWith(":" + childNodeName))) {
return value.getTextContent();
}
}