Skip to content

Commit 0289a2a

Browse files
committed
visibility changes
1 parent 24199aa commit 0289a2a

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

libs/entitlement/src/main/java/org/elasticsearch/entitlement/initialization/DynamicInstrumentation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import java.util.stream.Stream;
4545
import java.util.stream.StreamSupport;
4646

47-
class DynamicInstrumentation {
47+
public class DynamicInstrumentation {
4848

4949
interface InstrumentationInfoFactory {
5050
InstrumentationService.InstrumentationInfo of(String methodName, Class<?>... parameterTypes) throws ClassNotFoundException,
@@ -93,7 +93,7 @@ InstrumentationService.InstrumentationInfo of(String methodName, Class<?>... par
9393
* @param checkerInterface the interface to use to find methods to instrument and to use in the injected instrumentation code
9494
* @param verifyBytecode whether we should perform bytecode verification before and after instrumenting each method
9595
*/
96-
static void initialize(Instrumentation inst, Class<?> checkerInterface, boolean verifyBytecode) throws ClassNotFoundException,
96+
public static void initialize(Instrumentation inst, Class<?> checkerInterface, boolean verifyBytecode) throws ClassNotFoundException,
9797
NoSuchMethodException, UnmodifiableClassException {
9898

9999
var checkMethods = getMethodsToInstrument(checkerInterface);

libs/entitlement/src/main/java/org/elasticsearch/entitlement/initialization/EntitlementCheckerUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
package org.elasticsearch.entitlement.initialization;
1111

12-
class EntitlementCheckerUtils {
12+
public class EntitlementCheckerUtils {
1313

1414
/**
1515
* Returns the "most recent" checker class compatible with the provided runtime Java version.
1616
* For checkers, we have (optionally) version specific classes, each with a prefix (e.g. Java23).
1717
* The mapping cannot be automatic, as it depends on the actual presence of these classes in the final Jar (see
1818
* the various mainXX source sets).
1919
*/
20-
static Class<?> getVersionSpecificCheckerClass(Class<?> baseClass, int javaVersion) {
20+
public static Class<?> getVersionSpecificCheckerClass(Class<?> baseClass, int javaVersion) {
2121
String packageName = baseClass.getPackageName();
2222
String baseClassName = baseClass.getSimpleName();
2323

libs/entitlement/src/main/java/org/elasticsearch/entitlement/initialization/FilesEntitlementsValidation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
import static org.elasticsearch.entitlement.runtime.policy.entitlements.FilesEntitlement.Mode.READ;
2828
import static org.elasticsearch.entitlement.runtime.policy.entitlements.FilesEntitlement.Mode.READ_WRITE;
2929

30-
class FilesEntitlementsValidation {
30+
public class FilesEntitlementsValidation {
3131

32-
static void validate(Map<String, Policy> pluginPolicies, PathLookup pathLookup) {
32+
public static void validate(Map<String, Policy> pluginPolicies, PathLookup pathLookup) {
3333
Set<Path> readAccessForbidden = new HashSet<>();
3434
pathLookup.getBaseDirPaths(PLUGINS).forEach(p -> readAccessForbidden.add(p.toAbsolutePath().normalize()));
3535
pathLookup.getBaseDirPaths(MODULES).forEach(p -> readAccessForbidden.add(p.toAbsolutePath().normalize()));

libs/entitlement/src/main/java/org/elasticsearch/entitlement/initialization/HardcodedEntitlements.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import static org.elasticsearch.entitlement.runtime.policy.entitlements.FilesEntitlement.Mode.READ;
4343
import static org.elasticsearch.entitlement.runtime.policy.entitlements.FilesEntitlement.Mode.READ_WRITE;
4444

45-
class HardcodedEntitlements {
45+
public class HardcodedEntitlements {
4646

4747
private static List<Scope> createServerEntitlements(Path pidFile) {
4848

@@ -179,7 +179,7 @@ private static List<Scope> createServerEntitlements(Path pidFile) {
179179
return serverScopes;
180180
}
181181

182-
static Policy serverPolicy(Path pidFile, Policy serverPolicyPatch) {
182+
public static Policy serverPolicy(Path pidFile, Policy serverPolicyPatch) {
183183
var serverScopes = createServerEntitlements(pidFile);
184184
return new Policy(
185185
"server",
@@ -190,7 +190,7 @@ static Policy serverPolicy(Path pidFile, Policy serverPolicyPatch) {
190190
// agents run without a module, so this is a special hack for the apm agent
191191
// this should be removed once https://github.com/elastic/elasticsearch/issues/109335 is completed
192192
// See also modules/apm/src/main/plugin-metadata/entitlement-policy.yaml
193-
static List<Entitlement> agentEntitlements() {
193+
public static List<Entitlement> agentEntitlements() {
194194
return List.of(
195195
new CreateClassLoaderEntitlement(),
196196
new ManageThreadsEntitlement(),

0 commit comments

Comments
 (0)