This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5341-classloaders in repository https://gitbox.apache.org/repos/asf/struts.git
commit ace4036fa8d292ff0bceffe0550f9596f063901b Author: Kusal Kithul-Godage <g...@kusal.io> AuthorDate: Tue Aug 29 09:44:50 2023 +1000 WW-5341 Add unit test for excluded pattern validation --- core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java b/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java index 3dbcbdafd..8694d9721 100644 --- a/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java +++ b/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java @@ -1763,6 +1763,10 @@ public class OgnlUtilTest extends XWorkTestCase { } } + public void testInvalidExcludedPackageNamePatterns() { + assertThrows(ConfigurationException.class, () -> ognlUtil.setExcludedPackageNamePatterns("[")); + } + public void testGetExcludedPackageNamePatternsAlternateConstructorPopulated() { // Getter should return an immutable collection OgnlUtil util = new OgnlUtil(new DefaultOgnlExpressionCacheFactory<>(), new DefaultOgnlBeanInfoCacheFactory<>());