Skip to content

Commit

Permalink
Fix JAX-RS Application class hierarchy handling in RESTEasy Reactive
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Apr 5, 2021
1 parent d65d3b5 commit d06eddf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class RestApplicationPathTestCase {
.overrideConfigKey("quarkus.rest.path", "/foo")
.overrideConfigKey("quarkus.http.root-path", "/app")
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
.addClasses(HelloResource.class, BarApp.class));
.addClasses(HelloResource.class, BarApp.class, BaseApplication.class));

/**
* Using @ApplicationPath will overlay/replace `quarkus.rest.path`.
Expand All @@ -33,7 +33,10 @@ public class RestApplicationPathTestCase {
* This path will also be relative to the configured HTTP root
*/
@ApplicationPath("/bar")
public static class BarApp extends Application {
public static class BarApp extends BaseApplication {
}

public static abstract class BaseApplication extends Application {
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public static ApplicationScanningResult scanForApplicationClass(IndexView index,
ClassInfo selectedAppClass = null;
boolean blocking = false;
for (ClassInfo applicationClassInfo : applications) {
if (Modifier.isAbstract(applicationClassInfo.flags())) {
continue;
}
if (selectedAppClass != null) {
throw new RuntimeException("More than one Application class: " + applications);
}
Expand Down

0 comments on commit d06eddf

Please sign in to comment.