[java-metadata-aggregator] 02/02: Suppress warnings about unchecked casts in selected tests
Ian Young
ian at iay.org.uk
Mon May 25 13:14:27 UTC 2020
This is an automated email from the git hooks/post-receive script.
iay pushed a commit to branch master
in repository java-metadata-aggregator.
View the commit online:
http://git.shibboleth.net/view/?p=java-metadata-aggregator.git;a=commit;h=6f8320cccbf9154fd4979f35bc44737e0c47ea21
commit 6f8320cccbf9154fd4979f35bc44737e0c47ea21
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Mon May 25 13:54:02 2020 +0100
Suppress warnings about unchecked casts in selected tests
---
.../mdattr/AssuranceCertificationMatcherSpringTest.java | 14 ++++++--------
.../dom/saml/mdattr/EntityCategoryMatcherSpringTest.java | 8 ++++----
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdattr/AssuranceCertificationMatcherSpringTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdattr/AssuranceCertificationMatcherSpringTest.java
index a812cd7..ebaa12f 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdattr/AssuranceCertificationMatcherSpringTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdattr/AssuranceCertificationMatcherSpringTest.java
@@ -48,11 +48,10 @@ public class AssuranceCertificationMatcherSpringTest extends AbstractTestNGSprin
}
@Test
+ @SuppressWarnings("unchecked")
public void testNoRA() {
- final Predicate<EntityAttributeContext> matcher =
- (Predicate<EntityAttributeContext>)applicationContext.getBean("certificationMatcherNoRA", Predicate.class);
- final Predicate<EntityAttributeContext> oldMatcher =
- (Predicate<EntityAttributeContext>)applicationContext.getBean("oldMatcherNoRA", Predicate.class);
+ final var matcher = applicationContext.getBean("certificationMatcherNoRA", Predicate.class);
+ final var oldMatcher = applicationContext.getBean("oldMatcherNoRA", Predicate.class);
// all four components match
test(true, matcher, oldMatcher,
@@ -77,11 +76,10 @@ public class AssuranceCertificationMatcherSpringTest extends AbstractTestNGSprin
}
@Test
+ @SuppressWarnings("unchecked")
public void testWithRA() {
- final Predicate<EntityAttributeContext> matcher =
- (Predicate<EntityAttributeContext>)applicationContext.getBean("certificationMatcherWithRA", Predicate.class);
- final Predicate<EntityAttributeContext> oldMatcher =
- (Predicate<EntityAttributeContext>)applicationContext.getBean("oldMatcherWithRA", Predicate.class);
+ final var matcher = applicationContext.getBean("certificationMatcherWithRA", Predicate.class);
+ final var oldMatcher = applicationContext.getBean("oldMatcherWithRA", Predicate.class);
// all four components match
test(true, matcher, oldMatcher,
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdattr/EntityCategoryMatcherSpringTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdattr/EntityCategoryMatcherSpringTest.java
index 319495a..670572f 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdattr/EntityCategoryMatcherSpringTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdattr/EntityCategoryMatcherSpringTest.java
@@ -43,9 +43,9 @@ public class EntityCategoryMatcherSpringTest extends AbstractTestNGSpringContext
}
@Test
+ @SuppressWarnings("unchecked")
public void testNoRA() {
- final Predicate<EntityAttributeContext> matcher =
- (Predicate<EntityAttributeContext>)applicationContext.getBean("categoryMatcherNoRA", Predicate.class);
+ final var matcher = applicationContext.getBean("categoryMatcherNoRA", Predicate.class);
// all four components match
test(true, matcher, new ContextImpl("category", "http://macedir.org/entity-category",
@@ -65,9 +65,9 @@ public class EntityCategoryMatcherSpringTest extends AbstractTestNGSpringContext
}
@Test
+ @SuppressWarnings("unchecked")
public void testWithRA() {
- final Predicate<EntityAttributeContext> matcher =
- (Predicate<EntityAttributeContext>)applicationContext.getBean("categoryMatcherWithRA", Predicate.class);
+ final var matcher = applicationContext.getBean("categoryMatcherWithRA", Predicate.class);
// all four components match
test(true, matcher, new ContextImpl("category", "http://macedir.org/entity-category",
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list