-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace "blacklist/whitelist" terminology in Java APIs #1683
Comments
I decide to add back the old usages of the public classes or interfaces that contains |
There is one usage of the impacted classes or methods in opensearch-project organization: |
This appears to be used by the k-NN plugin as well |
After an incomplete attempt to provide alternative The impact of the plugin developers is likely be minor, if making as breaking change instead of deprecated in advance.
The detailed reason not to deprecate Line 42 in 388c80a
I found it's hard to support the return type For example, the return type OpenSearch/modules/lang-painless/src/main/java/org/opensearch/painless/PainlessScriptEngine.java Line 104 in 388c80a
I have tried to make
Java doesn't support me to provide 2 constructors to receive either With the above problems, it's hard to keep the backwards compatibility, while providing alternative new API. |
Is your feature request related to a problem? Please describe.
Replace the "blacklist/whitelist" terminology in all Java APIs, including field, method, class, and package names.
The "Java APIs" refers to those packaged in Java libraries and are published to Maven (https://search.maven.org/search?q=g:org.opensearch https://mvnrepository.com/artifact/org.opensearch)
Impact:
All plugins, clients and tools that use OpenSearch Java APIs from OpenSearch Java libraries which contain non-inclusive terminologies have to make corresponding changes to call new APIs, if they want to upgrade the dependency to a future major version of OpenSearch.
A part of #1483
Describe the solution you'd like
Replace the "blacklist/whitelist" terminology with "denylist/allowlist" in all Java APIs that are exposed in Java libraries.
Describe alternatives you've considered
None.
Additional context
Locations of "blacklist/whitelist" in API of Java library:
1
Painless SPI
- multiple classes with name “Whitelist”Code: https://github.com/opensearch-project/OpenSearch/tree/1.0.0/modules/lang-painless/spi/src/main/java/org/opensearch/painless/spi
Javadoc: https://opensearch.org/javadocs/1.0.0/OpenSearch/modules/lang-painless/spi/build/docs/javadoc/org/opensearch/painless/spi/package-summary.html
2 Subclasses of the
Painless SPI
classes:ProcessorsWhitelistExtension
Code: https://github.com/opensearch-project/OpenSearch/blob/2.0.0/modules/ingest-common/src/main/java/org/opensearch/ingest/common/ProcessorsWhitelistExtension.java
The regex to filter the lines with public or protected class definition contains "whitelist" terminology:
(public|protected)(.)+(class|interface)\s(\w)*Whitelist
List of the classes need renaming:
In package
org.opensearch.painless.spi
In package
org.opensearch.ingest.common
:LIst of the public method and variables need renaming:
In
final class Whitelist
:In
final class WhitelistClass
:In
interface PainlessExtension
:There are some methods whose return type are objects of classes contain
Whitelist
, so the backwards compatibility needs to be considered:In
final class WhitelistLoader
:In
interface WhitelistAnnotationParser
:The text was updated successfully, but these errors were encountered: