Merge pull request #729 from apache/fix/WW-5327-removes-duplicate

[WW-5327] Removes duplicated exclusion
This commit is contained in:
Lukasz Lenart
2023-08-17 12:41:29 +03:00
committed by GitHub
2 changed files with 5 additions and 7 deletions
@@ -37,9 +37,7 @@
java.lang.ProcessBuilder,
java.lang.Thread,
sun.misc.Unsafe,
com.opensymphony.xwork2.ActionContext,
com.opensymphony.xwork2.ognl.SecurityMemberAccess,
com.opensymphony.xwork2.ognl.OgnlValueStack"/>
com.opensymphony.xwork2.ActionContext"/>
<constant name="struts.devMode.excludedClasses"
value="
@@ -879,10 +879,10 @@ public class OgnlUtilTest extends XWorkTestCase {
assertEquals(123, foo.getALong());
}
public void testBeanMapExpressions() throws OgnlException {
public void testBeanMapExpressions() throws OgnlException, NoSuchMethodException {
Foo foo = new Foo();
ognlUtil.setExcludedClasses(
"com.opensymphony.xwork2.ognl.SecurityMemberAccess"
ognlUtil.setExcludedPackageNames(
"com.opensymphony.xwork2.ognl."
);
Map<String, Object> context = ognlUtil.createDefaultContext(foo);
@@ -903,7 +903,7 @@ public class OgnlUtilTest extends XWorkTestCase {
assertEquals(foo.getTitle(), expression);
SecurityMemberAccess sma = (SecurityMemberAccess) ((OgnlContext) context).getMemberAccess();
assertTrue(sma.isClassExcluded(SecurityMemberAccess.class));
assertFalse(sma.isAccessible(context, sma, sma.getClass().getDeclaredMethod("setExcludedClasses", Set.class), "excludedClasses"));
}
public void testNullProperties() {