[java-metadata-aggregator] 02/02: Remove redundant null check (SpotBugs)

Ian Young ian at iay.org.uk
Fri Aug 26 16:24:49 UTC 2022


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

iay pushed a commit to branch main
in repository java-metadata-aggregator.

View the commit online:
http://git.shibboleth.net/view/?p=java-metadata-aggregator.git;a=commit;h=3210851353b3ccac31f988b43547fe01461df4de

commit 3210851353b3ccac31f988b43547fe01461df4de
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Fri Aug 26 17:23:58 2022 +0100

    Remove redundant null check (SpotBugs)
---
 .../java/net/shibboleth/metadata/dom/XPathItemSelectionStrategy.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/XPathItemSelectionStrategy.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/XPathItemSelectionStrategy.java
index 26b1f3d..e8bc7c7 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/dom/XPathItemSelectionStrategy.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/XPathItemSelectionStrategy.java
@@ -72,9 +72,8 @@ public class XPathItemSelectionStrategy implements Predicate<Item<Element>> {
 
         final XPathFactory factory = XPathFactory.newInstance();
         final XPath xpath = factory.newXPath();
-        if (namespaceContext != null) {
-            xpath.setNamespaceContext(namespaceContext);
-        }
+        xpath.setNamespaceContext(namespaceContext);
+
         compiledExpression = xpath.compile(expression);
     }
 

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


More information about the commits mailing list