Skip to content

Commit

Permalink
[Rename] refactor libs/plugin-cli and libs/secure-sm. (#261)
Browse files Browse the repository at this point in the history
Refactor the libs/plugin-cli and libs/secure-sm modules to rename the package names

- `org.elasticsearch.plugins` to `org.opensearch.plugins`
- `org.elasticsearch.secure_sm` to `org.opensearch.secure_sm`

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
  • Loading branch information
adnapibar authored Mar 11, 2021
1 parent 70acc75 commit c016486
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.elasticsearch.plugins;
package org.opensearch.plugins;

import java.security.AccessController;
import java.security.PrivilegedAction;
Expand Down
4 changes: 2 additions & 2 deletions libs/secure-sm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
apply plugin: 'elasticsearch.publish'
apply plugin: 'opensearch.publish'

dependencies {
// do not add non-test compile dependencies to secure-sm without a good reason to do so
Expand All @@ -26,7 +26,7 @@ dependencies {
testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}"

testImplementation(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-secure-sm'
exclude group: 'org.opensearch', module: 'opensearch-secure-sm'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.elasticsearch.secure_sm;
package org.opensearch.secure_sm;

import java.security.AccessController;
import java.security.Permission;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.elasticsearch.secure_sm;
package org.opensearch.secure_sm;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.elasticsearch.secure_sm;
package org.opensearch.secure_sm;

import java.security.BasicPermission;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.elasticsearch.secure_sm;
package org.opensearch.secure_sm;

import junit.framework.TestCase;

Expand Down Expand Up @@ -60,8 +60,8 @@ public void testClassCanExit() {
assertTrue(SecureSM.classCanExit("com.carrotsearch.ant.tasks.junit4.slave.JvmExit", SecureSM.TEST_RUNNER_PACKAGES));
assertTrue(SecureSM.classCanExit("org.eclipse.jdt.internal.junit.runner.RemoteTestRunner", SecureSM.TEST_RUNNER_PACKAGES));
assertTrue(SecureSM.classCanExit("com.intellij.rt.execution.junit.JUnitStarter", SecureSM.TEST_RUNNER_PACKAGES));
assertTrue(SecureSM.classCanExit("org.elasticsearch.Foo", new String[]{"org.elasticsearch.Foo"}));
assertFalse(SecureSM.classCanExit("org.elasticsearch.Foo", new String[]{"org.elasticsearch.Bar"}));
assertTrue(SecureSM.classCanExit("org.opensearch.Foo", new String[]{"org.opensearch.Foo"}));
assertFalse(SecureSM.classCanExit("org.opensearch.Foo", new String[]{"org.opensearch.Bar"}));
}

public void testCreateThread() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.elasticsearch.secure_sm;
package org.opensearch.secure_sm;

import junit.framework.TestCase;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.elasticsearch.http.HttpTransportSettings;
import org.elasticsearch.plugins.PluginInfo;
import org.elasticsearch.plugins.PluginsService;
import org.elasticsearch.secure_sm.SecureSM;
import org.opensearch.secure_sm.SecureSM;
import org.elasticsearch.transport.TcpTransport;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package org.elasticsearch.plugins;

import org.opensearch.plugins.ExtendedPluginsClassLoader;

import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.elasticsearch.common.network.IfConfig;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.PluginInfo;
import org.elasticsearch.secure_sm.SecureSM;
import org.opensearch.secure_sm.SecureSM;
import org.junit.Assert;

import java.io.InputStream;
Expand Down

0 comments on commit c016486

Please sign in to comment.