[spring-extensions] branch main updated: IDP-1901 - Add canary for Spring Expression issue fixed in 5.3.16
Ian Young
ian at iay.org.uk
Mon Feb 21 16:00:08 UTC 2022
This is an automated email from the git hooks/post-receive script.
iay pushed a commit to branch main
in repository spring-extensions.
View the commit online:
http://git.shibboleth.net/view/?p=spring-extensions.git;a=commit;h=5f936089cbb1ac67c0459bf8a4f281445bff4338
The following commit(s) were added to refs/heads/main by this push:
new 5f93608 IDP-1901 - Add canary for Spring Expression issue fixed in 5.3.16
5f93608 is described below
commit 5f936089cbb1ac67c0459bf8a4f281445bff4338
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Mon Feb 21 16:00:04 2022 +0000
IDP-1901 - Add canary for Spring Expression issue fixed in 5.3.16
https://shibboleth.atlassian.net/browse/IDP-1901
---
.../ext/spring/util/SpringExpressionTest.java | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/src/test/java/net/shibboleth/ext/spring/util/SpringExpressionTest.java b/src/test/java/net/shibboleth/ext/spring/util/SpringExpressionTest.java
index 40a68ae..394043a 100644
--- a/src/test/java/net/shibboleth/ext/spring/util/SpringExpressionTest.java
+++ b/src/test/java/net/shibboleth/ext/spring/util/SpringExpressionTest.java
@@ -17,6 +17,9 @@
package net.shibboleth.ext.spring.util;
+import java.util.HashMap;
+
+import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -57,4 +60,28 @@ public class SpringExpressionTest {
Assert.assertEquals((int) new SpringExpressionFunction<>("#input.getValue99()").apply(this), 99);
}
+
+ /**
+ * <p>Canary test for an issue reported to us as IDP-1901.</p>
+ *
+ * <p>This is a bug in Spring Framework which we reported as GitHub issue 27995.</p>
+ *
+ * <p>The upstream bug was fixed in Spring Framework 5.3.16; this is a canary test to
+ * make sure we are aware if it reappears.</p>
+ *
+ * @throws Exception if the bad thing happens
+ *
+ * @see <a href='https://shibboleth.atlassian.net/browse/IDP-1901'>IDP-1901</a>
+ * @see <a href='https://github.com/spring-projects/spring-framework/issues/27995'>
+ * GitHub issue 27995</a>
+ */
+ @Test public void idp1901Canary() throws Exception {
+ var map = new HashMap<String, String>();
+ map.put("key", "value");
+ var iter = map.entrySet().iterator();
+ Assert.assertTrue(iter.hasNext());
+ var output = new SpelExpressionParser().parseExpression("hasNext()").getValue(iter, Boolean.class);
+ Assert.assertNotNull(output);
+ Assert.assertTrue(output);
+ }
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list