Skip to content

Commit

Permalink
Fix JAX-RS Application class hierarchy handling in RESTEasy Classic
Browse files Browse the repository at this point in the history
Fixes: #16228
  • Loading branch information
geoand committed Apr 5, 2021
1 parent c7b5494 commit d65d3b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,9 @@ private static Set<String> getAllowedClasses(IndexView index) {
Application application;
ClassInfo selectedAppClass = null;
for (ClassInfo applicationClassInfo : applications) {
if (Modifier.isAbstract(applicationClassInfo.flags())) {
continue;
}
if (selectedAppClass != null) {
throw new RuntimeException("More than one Application class: " + applications);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class ApplicationPathHttpRootTest {
@RegisterExtension
static QuarkusUnitTest runner = new QuarkusUnitTest()
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
.addClasses(HelloResource.class, HelloApp.class)
.addClasses(HelloResource.class, HelloApp.class, BaseApplication.class)
.addAsResource(new StringAsset("quarkus.http.root-path=/foo"), "application.properties"));

@Test
Expand All @@ -44,7 +44,11 @@ public String hello() {
}

@ApplicationPath("hello")
public static class HelloApp extends Application {
public static class HelloApp extends BaseApplication {

}

public static abstract class BaseApplication extends Application {

}

Expand Down

0 comments on commit d65d3b5

Please sign in to comment.