summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/DomUtils.java
diff options
context:
space:
mode:
authorThomas <thomas.lenz@egiz.gv.at>2019-12-04 22:54:51 +0100
committerThomas <thomas.lenz@egiz.gv.at>2019-12-04 22:54:51 +0100
commit95b21a826e5d81fdeabcf4673a9e87047edaec9d (patch)
treed8d55da492dd86041c31d68651afa21c80313362 /eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/DomUtils.java
parent759ac5f42c6aff901dbeede4fbf1a1d2e08cad0f (diff)
downloadEAAF-Components-95b21a826e5d81fdeabcf4673a9e87047edaec9d.tar.gz
EAAF-Components-95b21a826e5d81fdeabcf4673a9e87047edaec9d.tar.bz2
EAAF-Components-95b21a826e5d81fdeabcf4673a9e87047edaec9d.zip
to some more code quality tasks
Diffstat (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/DomUtils.java')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/DomUtils.java11
1 files changed, 5 insertions, 6 deletions
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 {
* <code>null</code> 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++) {