Skip to content

Commit

Permalink
Replace useless DynamicFeatureResourceInfo class with ResteasyReactiv…
Browse files Browse the repository at this point in the history
…eResourceInfo

Fixes: quarkusio#13981
  • Loading branch information
geoand committed Dec 19, 2020
1 parent 1a83ef7 commit 1854d37
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ public RuntimeResourceDeployment(DeploymentInfo info, Supplier<Executor> executo

public RuntimeResource buildResourceMethod(ResourceClass clazz,
ServerResourceMethod method, boolean locatableResource, URITemplate classPathTemplate) {
RuntimeInterceptorDeployment.MethodInterceptorContext interceptorDeployment = runtimeInterceptorDeployment
.forMethod(clazz, method);

URITemplate methodPathTemplate = new URITemplate(method.getPath(), false);
List<ServerRestHandler> abortHandlingChain = new ArrayList<>();
MultivaluedMap<ScoreSystem.Category, ScoreSystem.Diagnostic> score = new QuarkusMultivaluedHashMap<>();
Expand All @@ -131,6 +130,17 @@ public RuntimeResource buildResourceMethod(ResourceClass clazz,
}
}

Class<Object> resourceClass = loadClass(clazz.getClassName());
Class<?>[] parameterClasses = new Class[method.getParameters().length];
for (int i = 0; i < method.getParameters().length; ++i) {
parameterClasses[i] = loadClass(method.getParameters()[i].declaredType);
}
ResteasyReactiveResourceInfo lazyMethod = new ResteasyReactiveResourceInfo(method.getName(), resourceClass,
parameterClasses, method.getMethodAnnotationNames());

RuntimeInterceptorDeployment.MethodInterceptorContext interceptorDeployment = runtimeInterceptorDeployment
.forMethod(method, lazyMethod);

//setup reader and writer interceptors first
handlers.addAll(interceptorDeployment.setupInterceptorHandler());
//at this point the handler chain only has interceptors
Expand Down Expand Up @@ -188,14 +198,6 @@ public RuntimeResource buildResourceMethod(ResourceClass clazz,
}
}

Class<Object> resourceClass = loadClass(clazz.getClassName());
Class<?>[] parameterClasses = new Class[method.getParameters().length];
for (int i = 0; i < method.getParameters().length; ++i) {
parameterClasses[i] = loadClass(method.getParameters()[i].declaredType);
}
ResteasyReactiveResourceInfo lazyMethod = new ResteasyReactiveResourceInfo(method.getName(), resourceClass,
parameterClasses, method.getMethodAnnotationNames());

for (int i = 0; i < parameters.length; i++) {
ServerMethodParameter param = (ServerMethodParameter) parameters[i];
boolean single = param.isSingle();
Expand Down

This file was deleted.

0 comments on commit 1854d37

Please sign in to comment.