From 95b21a826e5d81fdeabcf4673a9e87047edaec9d Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 4 Dec 2019 22:54:51 +0100 Subject: to some more code quality tasks --- .../main/java/at/gv/egiz/eaaf/core/impl/utils/DomUtils.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/DomUtils.java') diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/DomUtils.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/DomUtils.java index 818523d0..aafea776 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/DomUtils.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/DomUtils.java @@ -412,7 +412,7 @@ public class DomUtils { final String xmlContent = new String(buffer, "UTF-8"); log.debug("SAXException in:\n" + xmlContent); } - throw (e); + throw e; } return parser.getDocument(); @@ -925,10 +925,8 @@ public class DomUtils { final Attr attr = (Attr) n; final Element owner = attr.getOwnerElement(); - if (owner == null) { - if (!isNamespaceDeclaration(attr)) { - return false; - } + if (owner == null && !isNamespaceDeclaration(attr)) { + return false; } if (!nodeSet.contains(owner) && !isNamespaceDeclaration(attr)) { @@ -1054,6 +1052,7 @@ public class DomUtils { } default: { + log.trace("Node type: {} not supported", currentNode.getNodeType()); // All other nodes will be ignored } } @@ -1103,7 +1102,7 @@ public class DomUtils { * null or empty or no element is included in the list. */ public static Element getElementFromNodeList(final NodeList nl) { - if ((nl == null) || (nl.getLength() == 0)) { + if (nl == null || nl.getLength() == 0) { return null; } for (int i = 0; i < nl.getLength(); i++) { -- cgit v1.2.3