File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -126,11 +126,12 @@ private static Set<Module> findSystemModules() {
126126 .stream ()
127127 .map (ModuleReference ::descriptor )
128128 .collect (Collectors .toUnmodifiableSet ());
129- return ModuleLayer .boot ()
130- .modules ()
131- .stream ()
132- .filter (m -> systemModulesDescriptors .contains (m .getDescriptor ()))
133- .collect (Collectors .toUnmodifiableSet ());
129+ return Stream .concat (
130+ // entitlements is a "system" module, we can do anything from it
131+ Stream .of (PolicyManager .class .getModule ()),
132+ // anything in the boot layer is also part of the system
133+ ModuleLayer .boot ().modules ().stream ().filter (m -> systemModulesDescriptors .contains (m .getDescriptor ()))
134+ ).collect (Collectors .toUnmodifiableSet ());
134135 }
135136
136137 /**
You can’t perform that action at this time.
0 commit comments