[java-shib-metadata] branch main updated: JSSH-5 ServiceableComponent should implement AutoClose
Rod Widdowson
rdw at steadingsoftware.com
Thu Sep 29 13:33:21 UTC 2022
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch main
in repository java-shib-metadata.
View the commit online:
http://git.shibboleth.net/view/?p=java-shib-metadata.git;a=commit;h=06f8cb752b44c482dfe415c301fbc12e31d6f818
The following commit(s) were added to refs/heads/main by this push:
new 06f8cb752 JSSH-5 ServiceableComponent should implement AutoClose
06f8cb752 is described below
commit 06f8cb752b44c482dfe415c301fbc12e31d6f818
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Sep 29 14:33:11 2022 +0100
JSSH-5 ServiceableComponent should implement AutoClose
https://shibboleth.atlassian.net/browse/JSSH-5
Use auto close rather than manually unpinning things.
---
.../net/shibboleth/spring/metadata/InlineMetadataParserTest.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/shib-metadata-spring/src/test/java/net/shibboleth/spring/metadata/InlineMetadataParserTest.java b/shib-metadata-spring/src/test/java/net/shibboleth/spring/metadata/InlineMetadataParserTest.java
index 049c9a002..508b09759 100644
--- a/shib-metadata-spring/src/test/java/net/shibboleth/spring/metadata/InlineMetadataParserTest.java
+++ b/shib-metadata-spring/src/test/java/net/shibboleth/spring/metadata/InlineMetadataParserTest.java
@@ -115,16 +115,12 @@ public class InlineMetadataParserTest extends AbstractMetadataParserTest {
final ReloadableSpringService<MetadataResolver> ms =
context.getBean("shibboleth.MetadataResolverService", ReloadableSpringService.class);
- final ServiceableComponent<MetadataResolver> msc = ms.getServiceableComponent();
-
- try {
+ try (final ServiceableComponent<MetadataResolver> msc = ms.getServiceableComponent()){
final MetadataResolver resolver = msc.getComponent();
Assert.assertNotNull(resolver.resolveSingle(criteriaFor(IDP_ID)));
Assert.assertNotNull(resolver.resolveSingle(criteriaFor(SP_ID)));
- } finally {
- msc.unpinComponent();
}
- msc.unloadComponent();
+ ms.destroy();
}
}
\ 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