Skip to content

Commit 7a4ba3c

Browse files
committed
Remove unnecessary EntitledActions.newThread
1 parent 99ab3d9 commit 7a4ba3c

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

libs/entitlement/qa/entitled-plugin/src/main/java/org/elasticsearch/entitlement/qa/entitled/EntitledActions.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
public final class EntitledActions {
1818
private EntitledActions() {}
1919

20-
public static Thread newThread(Runnable runnable, String name) {
21-
return new Thread(runnable, name);
22-
}
23-
2420
public static UserPrincipal getFileOwner(Path path) throws IOException {
2521
return Files.getOwner(path);
2622
}

libs/entitlement/qa/entitled-plugin/src/main/java/org/elasticsearch/entitlement/qa/entitled/EntitledPlugin.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
import java.util.concurrent.atomic.AtomicBoolean;
1919

20-
import static org.elasticsearch.entitlement.qa.entitled.EntitledActions.newThread;
21-
2220
public class EntitledPlugin extends Plugin implements ExtensiblePlugin {
2321

2422
/**
@@ -34,7 +32,7 @@ private static void selfTestEntitled() {
3432
logger.debug("selfTestEntitled");
3533
AtomicBoolean threadRan = new AtomicBoolean(false);
3634
try {
37-
Thread testThread = newThread(() -> threadRan.set(true), "testThread");
35+
Thread testThread = new Thread(() -> threadRan.set(true), "testThread");
3836
testThread.start();
3937
testThread.join();
4038
} catch (InterruptedException e) {

libs/entitlement/qa/entitlement-test-plugin/src/main/java/org/elasticsearch/entitlement/qa/test/RestEntitlementsCheckAction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.elasticsearch.common.Strings;
1414
import org.elasticsearch.core.CheckedRunnable;
1515
import org.elasticsearch.core.SuppressForbidden;
16-
import org.elasticsearch.entitlement.qa.entitled.EntitledActions;
1716
import org.elasticsearch.logging.LogManager;
1817
import org.elasticsearch.logging.Logger;
1918
import org.elasticsearch.rest.BaseRestHandler;
@@ -452,7 +451,7 @@ protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient cli
452451

453452
static void java_lang_Thread$start() throws InterruptedException {
454453
AtomicBoolean threadRan = new AtomicBoolean(false);
455-
Thread thread = EntitledActions.newThread(() -> threadRan.set(true), "test");
454+
Thread thread = new Thread(() -> threadRan.set(true), "test");
456455
thread.start();
457456
thread.join();
458457
assert threadRan.get();

0 commit comments

Comments
 (0)