summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils
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
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')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/DomUtils.java11
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/EaafDomEntityResolver.java3
2 files changed, 5 insertions, 9 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++) {
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/EaafDomEntityResolver.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/EaafDomEntityResolver.java
index c2700214..6139e914 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/EaafDomEntityResolver.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/EaafDomEntityResolver.java
@@ -25,8 +25,6 @@ import java.io.InputStream;
import at.gv.egiz.eaaf.core.api.data.XMLNamespaceConstants;
import org.apache.xerces.util.URI;
import org.apache.xerces.util.URI.MalformedURIException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
@@ -46,7 +44,6 @@ import org.xml.sax.InputSource;
*
*/
public class EaafDomEntityResolver implements EntityResolver {
- private static final Logger log = LoggerFactory.getLogger(EaafDomEntityResolver.class);
/**
* Resolve an entity.