org.apache.struts2.ognl

## Class ThreadAllowlist

- java.lang.Object
- - org.apache.struts2.ognl.ThreadAllowlist

-     public class ThreadAllowlist
      extends Object

  Allows any bean to allowlist a class for use in OGNL expressions, for the current thread only. The allowlist can be cleared once any desired OGNL expressions have been evaluated.
  Since:
    6.4.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ThreadAllowlist()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `allowClass(Class<?> clazz)`
    `void` | `clearAllowlist()`
    `Set<Class<?>>` | `getAllowlist()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ThreadAllowlist

          public ThreadAllowlist()

  - ### Method Detail

    - #### allowClass

          public void allowClass(Class<?> clazz)

    - #### clearAllowlist

          public void clearAllowlist()

    - #### getAllowlist

          public Set<Class<?>> getAllowlist()

Copyright © 2000–2026 Apache Software Foundation. All rights reserved.