Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3147645
Add Boolean#parseBoolean to forbidden-apis
kvanerum Jun 19, 2025
78a79f3
Merge branch 'main' into add-parseboolean-to-forbidden-apis
kvanerum Jun 19, 2025
288c0b5
Merge branch 'elastic:main' into add-parseboolean-to-forbidden-apis
kvanerum Jun 25, 2025
5196d60
Remove suppression and replace with Booleans.parseBoolean
kvanerum Jun 26, 2025
945ae4a
Remove suppression and replace with Booleans.parseBoolean
kvanerum Jun 26, 2025
61ac240
Use Booleans.parseBoolean(...., false) in case setting is absent
kvanerum Jun 26, 2025
26ba14b
Update reason for suppressions
kvanerum Jun 26, 2025
db42edf
Suppress usage of Boolean.parseBoolean
kvanerum Jun 26, 2025
7e5cacb
Use Booleans.parseBoolean(...., false) in case setting is absent
kvanerum Jun 26, 2025
498de1d
Add Boolean.valueOf to forbidden-apis
kvanerum Jun 26, 2025
17bf3bb
Merge branch 'main' into add-parseboolean-to-forbidden-apis
mosche Jun 27, 2025
48d29ac
[CI] Auto commit changes from spotless
Jun 27, 2025
457f5cc
fix previous merge
mosche Jun 27, 2025
61bc66b
Resolve comments
kvanerum Jun 27, 2025
6038e21
Fix KerberosAuthenticationIT tests
kvanerum Jun 30, 2025
cb58501
Merge branch 'main' into add-parseboolean-to-forbidden-apis
elasticmachine Jul 1, 2025
834b2d0
Use Booleans.parseBooleanLenient instead of @SuppressForbidden for pe…
kvanerum Jul 3, 2025
eded713
Change Booleans.parseBooleanLenient to wrap Boolean.parseBoolean
kvanerum Jul 4, 2025
b5aa07d
Merge branch 'main' into add-parseboolean-to-forbidden-apis
mosche Jul 7, 2025
9c5cd5e
Merge branch 'main' into add-parseboolean-to-forbidden-apis
mosche Jul 8, 2025
245f16b
Merge branch 'main' into add-parseboolean-to-forbidden-apis
mosche Jul 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ java.nio.channels.SocketChannel#connect(java.net.SocketAddress)
# org.elasticsearch.core.Booleans#parseBoolean(java.lang.String) directly on the string.
@defaultMessage use org.elasticsearch.core.Booleans#parseBoolean(java.lang.String)
java.lang.Boolean#getBoolean(java.lang.String)
java.lang.Boolean#parseBoolean(java.lang.String)
java.lang.Boolean#valueOf(java.lang.String)

org.apache.lucene.util.IOUtils @ use @org.elasticsearch.core.internal.io instead

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

package org.elasticsearch.core.internal.provider;

import org.elasticsearch.core.SuppressForbidden;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -465,6 +467,7 @@ private static CodeSource codeSource(URL baseURL, String jarName) throws Malform
return new CodeSource(new URL(baseURL, jarName), (CodeSigner[]) null /*signers*/);
}

@SuppressForbidden(reason = "accept lenient manifest attributes")
private static boolean isMultiRelease(ClassLoader parent, String jarPrefix) throws IOException {
try (InputStream is = parent.getResourceAsStream(jarPrefix + "/META-INF/MANIFEST.MF")) {
if (is != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

package org.elasticsearch.entitlement.tools.publiccallersfinder;

import org.elasticsearch.core.Booleans;
import org.elasticsearch.core.SuppressForbidden;
import org.elasticsearch.entitlement.tools.ExternalAccess;
import org.elasticsearch.entitlement.tools.Utils;
Expand Down Expand Up @@ -191,7 +192,7 @@ private static void parseCsv(Path csvPath, MethodDescriptorConsumer methodConsum

public static void main(String[] args) throws IOException {
var csvFilePath = Path.of(args[0]);
boolean bubbleUpFromPublic = args.length >= 2 && Boolean.parseBoolean(args[1]);
boolean bubbleUpFromPublic = args.length >= 2 && Booleans.parseBoolean(args[1]);
parseCsv(csvFilePath, (method, module, access) -> identifyTopLevelEntryPoints(method, module, access, bubbleUpFromPublic));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ static boolean isMacOrLinuxAarch64() {
/** -Dorg.elasticsearch.nativeaccess.enableVectorLibrary=false to disable.*/
static final String ENABLE_JDK_VECTOR_LIBRARY = "org.elasticsearch.nativeaccess.enableVectorLibrary";

@SuppressForbidden(
reason = "TODO Deprecate any lenient usage of Boolean#parseBoolean https://github.com/elastic/elasticsearch/issues/128993"
)
static boolean checkEnableSystemProperty() {
return Optional.ofNullable(System.getProperty(ENABLE_JDK_VECTOR_LIBRARY)).map(Boolean::valueOf).orElse(Boolean.TRUE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;

import org.elasticsearch.core.Booleans;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
Expand All @@ -26,8 +27,8 @@ private static ElasticsearchCluster makeCluster() {

// On Serverless, we want to disallow scripted metrics aggs per default.
// The following override allows us to still run the scripted metrics agg tests without breaking bwc.
boolean disableAllowListPerDefault = Boolean.parseBoolean(
System.getProperty("tests.disable_scripted_metric_allow_list_per_default")
boolean disableAllowListPerDefault = Booleans.parseBoolean(
System.getProperty("tests.disable_scripted_metric_allow_list_per_default", "false")
);
if (disableAllowListPerDefault) {
return cluster.setting("search.aggs.only_allowed_metric_scripts", "false").build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.elasticsearch.common.settings.SecureString;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.core.Booleans;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.local.LocalClusterSpecBuilder;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
Expand Down Expand Up @@ -51,7 +52,7 @@ private static ElasticsearchCluster createCluster() {
if (initTestSeed().nextBoolean()) {
clusterBuilder.setting("xpack.license.self_generated.type", "trial");
}
boolean setNodes = Boolean.parseBoolean(System.getProperty("yaml.rest.tests.set_num_nodes", "true"));
boolean setNodes = Booleans.parseBoolean(System.getProperty("yaml.rest.tests.set_num_nodes", "true"));
if (setNodes) {
clusterBuilder.nodes(2);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.elasticsearch.common.settings.SecureString;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.core.Booleans;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.local.LocalClusterSpecBuilder;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
Expand Down Expand Up @@ -50,7 +51,7 @@ private static ElasticsearchCluster createCluster() {
.setting("xpack.security.enabled", "true")
.keystore("bootstrap.password", "x-pack-test-password")
.user("x_pack_rest_user", "x-pack-test-password");
boolean setNodes = Boolean.parseBoolean(System.getProperty("yaml.rest.tests.set_num_nodes", "true"));
boolean setNodes = Booleans.parseBoolean(System.getProperty("yaml.rest.tests.set_num_nodes", "true"));
if (setNodes) {
clusterBuilder.nodes(2);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.elasticsearch.common.settings.SecureString;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.core.Booleans;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.local.LocalClusterSpecBuilder;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
Expand Down Expand Up @@ -48,7 +49,7 @@ private static ElasticsearchCluster createCluster() {
.distribution(DistributionType.DEFAULT)
.setting("xpack.security.enabled", "true")
.user("x_pack_rest_user", "x-pack-test-password");
boolean setNodes = Boolean.parseBoolean(System.getProperty("yaml.rest.tests.set_num_nodes", "true"));
boolean setNodes = Booleans.parseBoolean(System.getProperty("yaml.rest.tests.set_num_nodes", "true"));
if (setNodes) {
clusterBuilder.nodes(2);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.CollectionUtils;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.core.Booleans;
import org.elasticsearch.core.Nullable;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
Expand Down Expand Up @@ -52,7 +53,7 @@ public class GeoIpReindexedIT extends ParameterizedFullClusterRestartTestCase {

// e.g. use ./gradlew -Dtests.jvm.argline="-Dgeoip_test_with_security=false" ":modules:ingest-geoip:qa:full-cluster-restart:check"
// to set this to false, if you so desire
private static final boolean useSecurity = Boolean.parseBoolean(System.getProperty("geoip_test_with_security", "true"));
private static final boolean useSecurity = Booleans.parseBoolean(System.getProperty("geoip_test_with_security", "true"));

private static final ElasticsearchCluster cluster = ElasticsearchCluster.local()
.distribution(DistributionType.DEFAULT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.elasticsearch.common.text.SizeLimitingStringWriter;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.unit.MemorySizeValue;
import org.elasticsearch.core.SuppressForbidden;
import org.elasticsearch.script.GeneralScriptException;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptContext;
Expand Down Expand Up @@ -96,6 +97,9 @@ public Set<ScriptContext<?>> getSupportedContexts() {
return Set.of(TemplateScript.CONTEXT, TemplateScript.INGEST_CONTEXT);
}

@SuppressForbidden(
reason = "TODO Deprecate any lenient usage of Boolean#parseBoolean https://github.com/elastic/elasticsearch/issues/128993"
)
private static CustomMustacheFactory createMustacheFactory(Map<String, String> options) {
CustomMustacheFactory.Builder builder = CustomMustacheFactory.builder();
if (options == null || options.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import org.elasticsearch.SpecialPermission;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.core.SuppressForbidden;
import org.elasticsearch.painless.Compiler.Loader;
import org.elasticsearch.painless.lookup.PainlessLookup;
import org.elasticsearch.painless.lookup.PainlessLookupBuilder;
Expand Down Expand Up @@ -391,6 +392,9 @@ ScriptScope compile(Compiler compiler, Loader loader, String scriptName, String
}
}

@SuppressForbidden(
reason = "TODO Deprecate any lenient usage of Boolean#parseBoolean https://github.com/elastic/elasticsearch/issues/128993"
)
private CompilerSettings buildCompilerSettings(Map<String, String> params) {
CompilerSettings compilerSettings;
if (params.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.elasticsearch.common.util.PageCacheRecycler;
import org.elasticsearch.core.Assertions;
import org.elasticsearch.core.Booleans;
import org.elasticsearch.core.SuppressForbidden;
import org.elasticsearch.monitor.jvm.JvmInfo;

import java.util.Arrays;
Expand Down Expand Up @@ -55,7 +56,7 @@ public class NettyAllocator {
+ ", factors={es.unsafe.use_netty_default_allocator=true}]";
} else {
final long heapSizeInBytes = JvmInfo.jvmInfo().getMem().getHeapMax().getBytes();
final boolean g1gcEnabled = Boolean.parseBoolean(JvmInfo.jvmInfo().useG1GC());
final boolean g1gcEnabled = useG1GC();
final long g1gcRegionSizeInBytes = JvmInfo.jvmInfo().getG1RegionSize();
final boolean g1gcRegionSizeIsKnown = g1gcRegionSizeInBytes != -1;
ByteSizeValue heapSize = ByteSizeValue.ofBytes(heapSizeInBytes);
Expand Down Expand Up @@ -169,6 +170,13 @@ public int pageSize() {
};
}

@SuppressForbidden(
reason = "TODO Deprecate any lenient usage of Boolean#parseBoolean https://github.com/elastic/elasticsearch/issues/128993"
)
private static boolean useG1GC() {
return Boolean.parseBoolean(JvmInfo.jvmInfo().useG1GC());
}

public static void logAllocatorDescriptionIfNeeded() {
if (descriptionLogged.compareAndSet(false, true)) {
logger.info("creating NettyAllocator with the following configs: " + NettyAllocator.getAllocatorDescription());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.core.Booleans;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.test.XContentTestUtils;
Expand Down Expand Up @@ -330,7 +331,7 @@ protected static List<ClusterBlock> indexBlocks(String indexName) throws Excepti
@SuppressWarnings("unchecked")
protected static void assertIndexSetting(String indexName, Setting<?> setting, Matcher<Boolean> matcher) throws Exception {
var indexSettings = getIndexSettingsAsMap(indexName);
assertThat(Boolean.parseBoolean((String) indexSettings.get(setting.getKey())), matcher);
assertThat(Booleans.parseBoolean((String) indexSettings.get(setting.getKey()), false), matcher);
}

protected static ResponseException expectUpdateIndexSettingsThrows(String indexName, Settings.Builder settings) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.core.Booleans;
import org.elasticsearch.packaging.test.PackagingTestCase;

import java.io.IOException;
Expand Down Expand Up @@ -82,7 +83,7 @@ public static void waitForElasticsearch(Installation installation) throws Except
.lines()
.filter(each -> each.startsWith("xpack.security.enabled"))
.findFirst()
.map(line -> Boolean.parseBoolean(line.split("=")[1]))
.map(line -> Booleans.parseBoolean(line.split("=")[1]))
// security is enabled by default, the only way for it to be disabled is to be explicitly disabled
.orElse(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static ClusterType parse(String value) {
}

protected static final ClusterType CLUSTER_TYPE = ClusterType.parse(System.getProperty("tests.rest.suite"));
protected static final boolean FIRST_MIXED_ROUND = Boolean.parseBoolean(System.getProperty("tests.first_round", "false"));
protected static final Version UPGRADE_FROM_VERSION = Version.fromString(System.getProperty("tests.upgrade_from_version"));

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import org.elasticsearch.client.Request;
import org.elasticsearch.client.ResponseException;
import org.elasticsearch.core.Booleans;
import org.elasticsearch.indices.SystemIndices;
import org.elasticsearch.test.XContentTestUtils;
import org.junit.BeforeClass;
Expand All @@ -33,7 +34,7 @@ public FeatureUpgradeIT(@Name("upgradedNodes") int upgradedNodes) {

@BeforeClass
public static void ensureNotForwardCompatTest() {
assumeFalse("Only supported by bwc tests", Boolean.parseBoolean(System.getProperty("tests.fwc", "false")));
assumeFalse("Only supported by bwc tests", Booleans.parseBoolean(System.getProperty("tests.fwc", "false")));
}

public void testGetFeatureUpgradeStatus() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.elasticsearch.common.util.concurrent.CountDown;
import org.elasticsearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.core.Nullable;
import org.elasticsearch.core.SuppressForbidden;
import org.elasticsearch.index.Index;
import org.elasticsearch.injection.guice.Inject;
import org.elasticsearch.search.SearchService;
Expand Down Expand Up @@ -629,7 +630,7 @@ private static void enrichIndexAbstraction(
if (ia.isSystem()) {
attributes.add(Attribute.SYSTEM);
}
final boolean isFrozen = Boolean.parseBoolean(writeIndex.getSettings().get("index.frozen"));
final boolean isFrozen = isFrozen(writeIndex);
if (isFrozen) {
attributes.add(Attribute.FROZEN);
}
Expand Down Expand Up @@ -665,6 +666,13 @@ private static void enrichIndexAbstraction(
}
}

@SuppressForbidden(
reason = "TODO Deprecate any lenient usage of Boolean#parseBoolean https://github.com/elastic/elasticsearch/issues/128993"
)
private static boolean isFrozen(IndexMetadata writeIndex) {
return Boolean.parseBoolean(writeIndex.getSettings().get("index.frozen"));
}

private static Stream<Index> getAliasIndexStream(
ResolvedExpression resolvedExpression,
IndexAbstraction ia,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.common.Strings;
import org.elasticsearch.core.SuppressForbidden;

import java.util.Collections;
import java.util.HashMap;
Expand Down Expand Up @@ -111,7 +112,7 @@ public static LifecycleExecutionState fromCustomMetadata(Map<String, String> cus
}
String isAutoRetryableError = customData.get(IS_AUTO_RETRYABLE_ERROR);
if (isAutoRetryableError != null) {
builder.setIsAutoRetryableError(Boolean.parseBoolean(isAutoRetryableError));
builder.setIsAutoRetryableError(parseIsAutoRetryableError(isAutoRetryableError));
}
String failedStepRetryCount = customData.get(FAILED_STEP_RETRY_COUNT);
if (failedStepRetryCount != null) {
Expand Down Expand Up @@ -204,6 +205,13 @@ public static LifecycleExecutionState fromCustomMetadata(Map<String, String> cus
return builder.build();
}

@SuppressForbidden(
reason = "TODO Deprecate any lenient usage of Boolean#parseBoolean https://github.com/elastic/elasticsearch/issues/128993"
)
private static boolean parseIsAutoRetryableError(String isAutoRetryableError) {
return Boolean.parseBoolean(isAutoRetryableError);
}

/**
* Converts this object to an immutable map representation for use with
* {@link IndexMetadata.Builder#putCustom(String, Map)}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.Constants;
import org.elasticsearch.core.Predicates;
import org.elasticsearch.core.SuppressForbidden;

import java.io.IOException;
import java.net.Inet4Address;
Expand Down Expand Up @@ -44,7 +45,14 @@ private NetworkUtils() {}
* @deprecated transition mechanism only
*/
@Deprecated
static final boolean PREFER_V6 = Boolean.parseBoolean(System.getProperty("java.net.preferIPv6Addresses", "false"));
static final boolean PREFER_V6 = preferIPv6Addresses();

@SuppressForbidden(
reason = "TODO Deprecate any lenient usage of Boolean#parseBoolean https://github.com/elastic/elasticsearch/issues/128993"
)
static boolean preferIPv6Addresses() {
return Boolean.parseBoolean(System.getProperty("java.net.preferIPv6Addresses", "false"));
}

/**
* True if we can bind to a v6 address. Its silly, but for *binding* we have a need to know
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.core.Assertions;
import org.elasticsearch.core.Booleans;
import org.elasticsearch.core.CheckedFunction;
import org.elasticsearch.core.FixForMultiProject;
import org.elasticsearch.core.IOUtils;
Expand Down Expand Up @@ -690,7 +691,7 @@ public OnDiskStateMetadata loadOnDiskStateMetadataFromUserData(Map<String, Strin
Long.parseLong(userData.get(LAST_ACCEPTED_VERSION_KEY)),
userData.get(NODE_ID_KEY),
userData.get(CLUSTER_UUID_KEY),
userData.get(CLUSTER_UUID_COMMITTED_KEY) != null ? Boolean.parseBoolean(userData.get(CLUSTER_UUID_COMMITTED_KEY)) : null
userData.get(CLUSTER_UUID_COMMITTED_KEY) != null ? Booleans.parseBoolean(userData.get(CLUSTER_UUID_COMMITTED_KEY)) : null
);
}

Expand Down
10 changes: 9 additions & 1 deletion server/src/main/java/org/elasticsearch/index/IndexService.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.elasticsearch.core.CheckedFunction;
import org.elasticsearch.core.IOUtils;
import org.elasticsearch.core.Nullable;
import org.elasticsearch.core.SuppressForbidden;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.env.NodeEnvironment;
import org.elasticsearch.env.ShardLock;
Expand Down Expand Up @@ -246,7 +247,7 @@ public IndexService(
mapperMetrics
);
this.indexFieldData = new IndexFieldDataService(indexSettings, indicesFieldDataCache, circuitBreakerService);
boolean sourceOnly = Boolean.parseBoolean(indexSettings.getSettings().get("index.source_only"));
boolean sourceOnly = isSourceOnly(indexSettings);
if (indexSettings.getIndexSortConfig().hasIndexSort() && sourceOnly == false) {
// we delay the actual creation of the sort order for this index because the mapping has not been merged yet.
// The sort order is validated right after the merge of the mapping later in the process.
Expand Down Expand Up @@ -309,6 +310,13 @@ static boolean needsMapperService(IndexSettings indexSettings, IndexCreationCont
&& indexCreationContext == IndexCreationContext.CREATE_INDEX); // metadata verification needs a mapper service
}

@SuppressForbidden(
reason = "TODO Deprecate any lenient usage of Boolean#parseBoolean https://github.com/elastic/elasticsearch/issues/128993"
)
static boolean isSourceOnly(IndexSettings indexSettings) {
return Boolean.parseBoolean(indexSettings.getSettings().get("index.source_only"));
}

public enum IndexCreationContext {
CREATE_INDEX,
METADATA_VERIFICATION,
Expand Down
Loading