File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
cli/src/main/java/io/vertx/core/impl/launcher/commands Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -423,7 +423,7 @@ protected EventBusOptions getEventBusOptions(JsonObject jsonObject) {
423423 return eventBusOptions ;
424424 }
425425
426- private static final ThreadLocal <Logger > configureFromSystemProperties = new ThreadLocal <>();
426+ protected static final ThreadLocal <Logger > configureFromSystemProperties = new ThreadLocal <>();
427427
428428 /**
429429 * This is used as workaround to retain the existing behavior of the Vert.x CLI and won't be executed
Original file line number Diff line number Diff line change 1515import io .vertx .core .cli .CLIException ;
1616import io .vertx .core .cli .CommandLine ;
1717import io .vertx .core .cli .annotations .*;
18- import io .vertx .core .internal .VertxInternal ;
1918import io .vertx .core .impl .launcher .VertxLifecycleHooks ;
19+ import io .vertx .core .internal .VertxInternal ;
2020import io .vertx .core .json .JsonObject ;
2121import io .vertx .core .spi .launcher .ExecutionContext ;
2222
@@ -254,8 +254,16 @@ public void run() {
254254 }
255255
256256 deploymentOptions = new DeploymentOptions ();
257- configureFromSystemProperties (deploymentOptions , DEPLOYMENT_OPTIONS_PROP_PREFIX );
258- deploymentOptions .setConfig (conf ).setThreadingModel (worker ? ThreadingModel .WORKER : ThreadingModel .EVENT_LOOP ).setHa (ha ).setInstances (instances );
257+ configureFromSystemProperties .set (log );
258+ try {
259+ configureFromSystemProperties (deploymentOptions , DEPLOYMENT_OPTIONS_PROP_PREFIX );
260+ } finally {
261+ configureFromSystemProperties .set (null );
262+ }
263+ deploymentOptions .setConfig (conf ).setHa (ha ).setInstances (instances );
264+ if (worker ) {
265+ deploymentOptions .setThreadingModel (ThreadingModel .WORKER );
266+ }
259267 beforeDeployingVerticle (deploymentOptions );
260268 deploy ();
261269 } else {
You can’t perform that action at this time.
0 commit comments