Skip to content

Commit

Permalink
Remove leftovers of Java 8 classloader related code that went away wi…
Browse files Browse the repository at this point in the history
…th Java 11
  • Loading branch information
vietj committed Jan 11, 2024
1 parent 313b271 commit a35dd09
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 76 deletions.
26 changes: 0 additions & 26 deletions src/main/java/io/vertx/core/impl/ClassLoaderHolder.java

This file was deleted.

29 changes: 0 additions & 29 deletions src/main/java/io/vertx/core/impl/LoaderManager.java

This file was deleted.

23 changes: 2 additions & 21 deletions src/main/java/io/vertx/core/impl/VerticleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public class VerticleManager {

private final VertxInternal vertx;
private final DeploymentManager deploymentManager;
private final LoaderManager loaderManager = new LoaderManager();
private final Map<String, List<VerticleFactory>> verticleFactories = new ConcurrentHashMap<>();
private final List<VerticleFactory> defaultFactories = new ArrayList<>();

Expand Down Expand Up @@ -145,29 +144,11 @@ private static String getSuffix(int pos, String str) {
public Future<Deployment> deployVerticle(String identifier,
DeploymentOptions options) {
ContextInternal callingContext = vertx.getOrCreateContext();
ClassLoaderHolder holder;
ClassLoader loader = options.getClassLoader();
if (loader == null) {
holder = loaderManager.getClassLoader(options);
loader = holder != null ? holder.loader : getCurrentClassLoader();
} else {
holder = null;
}
Future<Deployment> deployment = doDeployVerticle(identifier, options, callingContext, callingContext, loader);
if (holder != null) {
deployment.onComplete(ar -> {
if (ar.succeeded()) {
Deployment result = ar.result();
result.undeployHandler(v -> {
loaderManager.release(holder);
});
} else {
// ??? not tested
throw new UnsupportedOperationException();
}
});
loader = getCurrentClassLoader();
}
return deployment;
return doDeployVerticle(identifier, options, callingContext, callingContext, loader);
}

private Future<Deployment> doDeployVerticle(String identifier,
Expand Down

0 comments on commit a35dd09

Please sign in to comment.