[java-support] branch master updated: CheckStyle

Rod Widdowson rdw at steadingsoftware.com
Fri Sep 2 05:24:38 EDT 2016


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch master
in repository java-support.

View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=2410c428a5500862a56c7f87c21aaac0c57aff81

The following commit(s) were added to refs/heads/master by this push:
       new  2410c42   CheckStyle
2410c42 is described below

commit 2410c428a5500862a56c7f87c21aaac0c57aff81
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Sep 2 10:24:02 2016 +0100

    CheckStyle
---
 .../utilities/java/support/xml/ElementSupport.java           | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/main/java/net/shibboleth/utilities/java/support/xml/ElementSupport.java b/src/main/java/net/shibboleth/utilities/java/support/xml/ElementSupport.java
index 091f5ca..e4c3b1f 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/xml/ElementSupport.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/xml/ElementSupport.java
@@ -157,7 +157,7 @@ public final class ElementSupport {
 
         Element childNode = getFirstChildElement(root);
         while (childNode != null) {
-            children.add((Element) childNode);
+            children.add(childNode);
             childNode = getNextSiblingElement(childNode);
         }
 
@@ -472,14 +472,10 @@ public final class ElementSupport {
         if (rootElement == null) {
             adoptElement(document, element);
             document.appendChild(element);
-            return;
-        }
-
-        if (rootElement.isSameNode(element)) {
-            return;
+        } else if (!rootElement.isSameNode(element)) {
+            adoptElement(document, element);
+            document.replaceChild(element, rootElement);
         }
 
-        adoptElement(document, element);
-        document.replaceChild(element, rootElement);
     }
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list