Skip to content

Commit db42edf

Browse files
committed
Suppress usage of Boolean.parseBoolean
1 parent 26ba14b commit db42edf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessScriptEngine.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import org.elasticsearch.SpecialPermission;
1313
import org.elasticsearch.common.settings.Settings;
14-
import org.elasticsearch.core.Booleans;
14+
import org.elasticsearch.core.SuppressForbidden;
1515
import org.elasticsearch.painless.Compiler.Loader;
1616
import org.elasticsearch.painless.lookup.PainlessLookup;
1717
import org.elasticsearch.painless.lookup.PainlessLookupBuilder;
@@ -392,6 +392,9 @@ ScriptScope compile(Compiler compiler, Loader loader, String scriptName, String
392392
}
393393
}
394394

395+
@SuppressForbidden(
396+
reason = "TODO Deprecate any lenient usage of Boolean#parseBoolean https://github.com/elastic/elasticsearch/issues/128993"
397+
)
395398
private CompilerSettings buildCompilerSettings(Map<String, String> params) {
396399
CompilerSettings compilerSettings;
397400
if (params.isEmpty()) {
@@ -415,7 +418,7 @@ private CompilerSettings buildCompilerSettings(Map<String, String> params) {
415418

416419
value = copy.remove(CompilerSettings.PICKY);
417420
if (value != null) {
418-
compilerSettings.setPicky(Booleans.parseBoolean(value));
421+
compilerSettings.setPicky(Boolean.parseBoolean(value));
419422
}
420423

421424
value = copy.remove(CompilerSettings.INITIAL_CALL_SITE_DEPTH);

0 commit comments

Comments
 (0)