-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
LibrariesLucene Upgrades and Libraries, Any 3rd party library that Core depends on, ex: nebula; team is respoLucene Upgrades and Libraries, Any 3rd party library that Core depends on, ex: nebula; team is respobugSomething isn't workingSomething isn't workingv2.17.0v3.0.0Issues and PRs related to version 3.0.0Issues and PRs related to version 3.0.0
Description
Describe the bug
In #13620, @reta correctly caught an incorrect use of org.apache.logging.log4j.util.Strings instead of org.opensearch.core.common.Strings.
I tried adding org.apache.logging.log4j.util.String to https://github.com/opensearch-project/OpenSearch/blob/main/buildSrc/src/main/resources/forbidden/opensearch-all-signatures.txt, and got the following errors (including the one I had added by accident):
Forbidden class/interface use: org.apache.logging.log4j.util.Strings [use (or add) helpers to org.opensearch.common.util instead]
in org.opensearch.env.NodeEnvironment (NodeEnvironment.java:1303)
Forbidden class/interface use: org.apache.logging.log4j.util.Strings [use (or add) helpers to org.opensearch.common.util instead]
in org.opensearch.index.IndexModule$DataLocalityType (IndexModule.java:583)
Forbidden class/interface use: org.apache.logging.log4j.util.Strings [use (or add) helpers to org.opensearch.common.util instead]
in org.opensearch.gateway.remote.RemoteClusterStateCleanupManager (RemoteClusterStateCleanupManager.java:128)
Forbidden class/interface use: org.apache.logging.log4j.util.Strings [use (or add) helpers to org.opensearch.common.util instead]
in org.opensearch.gateway.remote.RemoteClusterStateCleanupManager (RemoteClusterStateCleanupManager.java:129)
Forbidden class/interface use: org.apache.logging.log4j.util.Strings [use (or add) helpers to org.opensearch.common.util instead]
in org.opensearch.index.shard.ShardPath (ShardPath.java:208)
Forbidden class/interface use: org.apache.logging.log4j.util.Strings [use (or add) helpers to org.opensearch.common.util instead]
in org.opensearch.common.xcontent.JsonToStringXContentParser (JsonToStringXContentParser.java:113)
Forbidden class/interface use: org.apache.logging.log4j.util.Strings [use (or add) helpers to org.opensearch.common.util instead]
in org.opensearch.common.logging.JsonThrowablePatternConverter (JsonThrowablePatternConverter.java:87)
Scanned 7503 class file(s) for forbidden API invocations (in 13.70s), 7 error(s).
Related component
Libraries
To Reproduce
- Add
org.apache.logging.log4j.util.Stringsandjoptsimple.internal.Stringsto https://github.com/opensearch-project/OpenSearch/blob/main/buildSrc/src/main/resources/forbidden/opensearch-all-signatures.txt - Run
./gradlew precommit - Observe build failures.
Expected behavior
These existing uses of org.apache.logging.log4j.util.Strings should be replaced with uses of org.opensearch.core.common.Strings.
Additional Details
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
LibrariesLucene Upgrades and Libraries, Any 3rd party library that Core depends on, ex: nebula; team is respoLucene Upgrades and Libraries, Any 3rd party library that Core depends on, ex: nebula; team is respobugSomething isn't workingSomething isn't workingv2.17.0v3.0.0Issues and PRs related to version 3.0.0Issues and PRs related to version 3.0.0