[java-identity-provider] branch main updated: Fix null issues.

Scott Cantor cantor.2 at osu.edu
Mon Nov 10 16:26:38 UTC 2025


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

scantor pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
https://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=638dad0df4a193cfc06ed790aece3902ceaddf87

The following commit(s) were added to refs/heads/main by this push:
     new 638dad0df Fix null issues.
638dad0df is described below

commit 638dad0df4a193cfc06ed790aece3902ceaddf87
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Nov 10 11:26:35 2025 -0500

    Fix null issues.
---
 .../InstallableComponentPropertyCacheTest.java     | 30 ++++++++++++++++------
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/idp-admin-impl/src/test/java/net/shibboleth/idp/admin/impl/InstallableComponentPropertyCacheTest.java b/idp-admin-impl/src/test/java/net/shibboleth/idp/admin/impl/InstallableComponentPropertyCacheTest.java
index 1e02cd707..771f3da66 100644
--- a/idp-admin-impl/src/test/java/net/shibboleth/idp/admin/impl/InstallableComponentPropertyCacheTest.java
+++ b/idp-admin-impl/src/test/java/net/shibboleth/idp/admin/impl/InstallableComponentPropertyCacheTest.java
@@ -69,7 +69,9 @@ public class InstallableComponentPropertyCacheTest {
         final InstallableComponentPropertyCache cache = new InstallableComponentPropertyCache();
         cache.setCacheLife(Duration.ZERO);
         cache.initialize();
-        assertEquals(cache.loadInfo(urls, dummyClient, dummyParams).get(KEY), "none");
+        final Properties info = cache.loadInfo(urls, dummyClient, dummyParams);
+        assert info != null;
+        assertEquals(info.get(KEY), "none");
     }
 
     @Test public void testFiveSeconds() throws IOException, ComponentInitializationException, InterruptedException {
@@ -77,11 +79,17 @@ public class InstallableComponentPropertyCacheTest {
         final InstallableComponentPropertyCache cache = new InstallableComponentPropertyCache();
         cache.setCacheLife(Duration.ofSeconds(5));
         cache.initialize();
-        assertEquals(cache.loadInfo(urls, dummyClient, dummyParams).get(KEY), "pre5secs");
+        Properties info = cache.loadInfo(urls, dummyClient, dummyParams);
+        assert info != null;
+        assertEquals(info.get(KEY), "pre5secs");
         writeFile("post5secs");
-        assertEquals(cache.loadInfo(urls, dummyClient, dummyParams).get(KEY), "pre5secs");
+        info = cache.loadInfo(urls, dummyClient, dummyParams);
+        assert info != null;
+        assertEquals(info.get(KEY), "pre5secs");
         Thread.sleep(1000*6);
-        assertEquals(cache.loadInfo(urls, dummyClient, dummyParams).get(KEY), "post5secs");
+        info = cache.loadInfo(urls, dummyClient, dummyParams);
+        assert info != null;
+        assertEquals(info.get(KEY), "post5secs");
     }
 
     @Test public void testOneHour() throws IOException, ComponentInitializationException, InterruptedException {
@@ -89,11 +97,17 @@ public class InstallableComponentPropertyCacheTest {
         final InstallableComponentPropertyCache cache = new InstallableComponentPropertyCache();
         cache.setCacheLife(Duration.ofMinutes(60));
         cache.initialize();
-        assertEquals(cache.loadInfo(urls, dummyClient, dummyParams).get(KEY), "prehour");
+        Properties info = cache.loadInfo(urls, dummyClient, dummyParams);
+        assert info != null;
+        assertEquals(info.get(KEY), "prehour");
         writeFile("posthour");
-        assertEquals(cache.loadInfo(urls, dummyClient, dummyParams).get(KEY), "prehour");
+        info = cache.loadInfo(urls, dummyClient, dummyParams);
+        assert info != null;
+        assertEquals(info.get(KEY), "prehour");
         Thread.sleep(1000*6);
-        assertEquals(cache.loadInfo(urls, dummyClient, dummyParams).get(KEY), "prehour");
+        info = cache.loadInfo(urls, dummyClient, dummyParams);
+        assert info != null;
+        assertEquals(info.get(KEY), "prehour");
     }
-}
 
+}
\ 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