Skip to content

Commit

Permalink
Remove vertx.disableTCCL property
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed May 17, 2024
1 parent 540e458 commit 401d7ff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
5 changes: 4 additions & 1 deletion src/main/java/io/vertx/core/VertxOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ public class VertxOptions {
*/
public static final TimeUnit DEFAULT_WARNING_EXCEPTION_TIME_UNIT = TimeUnit.NANOSECONDS;

public static final boolean DEFAULT_DISABLE_TCCL = SysProps.DISABLE_TCCL.getBoolean();
/**
* The default value of thread context classloader disabling = {@code false}
*/
public static final boolean DEFAULT_DISABLE_TCCL = false;

/**
* Set default value to false for aligning with the old behavior
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/io/vertx/core/impl/SysProps.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ public enum SysProps {
*/
DISABLE_DNS_RESOLVER("vertx.disableDnsResolver"),

/**
* Default value of {@link io.vertx.core.VertxOptions#DEFAULT_DISABLE_TCCL}
*/
DISABLE_TCCL("vertx.disableTCCL"),

/**
* Default value of {@link io.vertx.core.file.FileSystemOptions#DEFAULT_FILE_CACHING_ENABLED}
*/
Expand Down
5 changes: 3 additions & 2 deletions src/test/benchmarks/io/vertx/benchmarks/ContextBenchmark.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.core.impl.BenchmarkContext;
import io.vertx.core.impl.ContextInternal;
import org.openjdk.jmh.annotations.Benchmark;
Expand Down Expand Up @@ -41,7 +42,7 @@ public static class BaselineState {

@Setup
public void setup() {
vertx = Vertx.vertx();
vertx = Vertx.vertx(new VertxOptions().setDisableTCCL(true));
context = BenchmarkContext.create(vertx);
task = v -> consume("the-string");
}
Expand All @@ -53,7 +54,7 @@ public void runOnContext(BaselineState state) {
}

@Benchmark
@Fork(jvmArgsAppend = { "-Dvertx.threadChecks=false", "-Dvertx.disableContextTimings=true", "-Dvertx.disableTCCL=true" })
@Fork(jvmArgsAppend = { "-Dvertx.threadChecks=false", "-Dvertx.disableContextTimings=true" })
public void runOnContextNoChecks(BaselineState state) {
state.context.runOnContext(state.task);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import io.vertx.core.Handler;
import io.vertx.core.MultiMap;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.http.HttpServerOptions;
import io.vertx.core.http.HttpServerRequest;
Expand Down Expand Up @@ -204,7 +205,7 @@ public int calculateNewCapacity(int minNewCapacity, int maxCapacity) {

@Setup
public void setup() {
vertx = (VertxInternal) Vertx.vertx();
vertx = (VertxInternal) Vertx.vertx(new VertxOptions().setDisableTCCL(true));
HttpServerOptions options = new HttpServerOptions();
vertxChannel = new EmbeddedChannel(
new VertxHttpRequestDecoder(options),
Expand Down Expand Up @@ -329,7 +330,6 @@ public Object vertx() {
@Fork(value = 1, jvmArgsAppend = {
"-Dvertx.threadChecks=false",
"-Dvertx.disableContextTimings=true",
"-Dvertx.disableTCCL=true",
"-Dvertx.disableHttpHeadersValidation=true",
"-Dvertx.disableMetrics=true"
})
Expand All @@ -343,7 +343,6 @@ public Object vertxOpt() {
@Fork(value = 1, jvmArgsAppend = {
"-Dvertx.threadChecks=false",
"-Dvertx.disableContextTimings=true",
"-Dvertx.disableTCCL=true",
"-Dvertx.disableHttpHeadersValidation=true",
"-Dvertx.disableMetrics=false"
})
Expand Down

0 comments on commit 401d7ff

Please sign in to comment.