Class Permissions.Markers

java.lang.Object
org.apache.commons.jexl3.internal.introspection.Permissions.Markers
Enclosing class:
Permissions

static final class Permissions.Markers extends Object
Holder for the singleton allow/deny markers and the UNRESTRICTED permission.

These live in their own class rather than directly in Permissions to break a class-initialization cycle: Permissions implements JexlPermissions, and JexlPermissions carries default methods, so initializing Permissions forces JexlPermissions.<clinit> to run first (JLS 12.4.2) — that computes RESTRICTED / SECURE via PermissionsParser, which reads these markers. Were they static fields of Permissions, they would still be null at that point (assigned only after superinterface initialization), yielding an NPE when Permissions happens to be the first permissions class touched. A dedicated holder initializes independently of that cycle, so the markers are always available whichever class is loaded first.