Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Blocking on resource is ignored if implementing an OpenAPI-generated interface #301

Closed
aureamunoz opened this issue Mar 24, 2021 · 0 comments
Assignees
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository

Comments

@aureamunoz
Copy link

Describe the bug

When generating interfaces from a OpenAPI defintion file via https://github.com/OpenAPITools/openapi-generator, all Jax-RS annotations are added to the interface so you don't have to repeat them in your actual resource that implements the interface.
If you decide that you need @Blocking, you have to put it in the interface to have it recognized.

Expected behavior

Since blocking or not is an implementation detail, I should not be forced to put this in the (generated) resource interface.

Actual behavior

As soon as a resource implements an interface that contains alls the Jax-RS annotations, @Blocking on the actually implemented methods (or the resource class) is ignored.

To Reproduce

quarkusio/quarkus-quickstarts@main...famod:issue-15940

Steps to reproduce the behavior:

  1. git clone https://github.com/famod/quarkus-quickstarts.git
  2. git switch issue-15940
  3. cd getting-started-reactive
  4. mvn verify (no error)
  5. remove @Blocking from ReactiveGreeting.greeting()
  6. mvn verify (error regarding IO thread)

Configuration

quarkus.datasource.db-kind=h2
quarkus.datasource.username=sa
quarkus.datasource.password=sa
quarkus.datasource.jdbc.url=jdbc:h2:mem:test_quarkus;DB_CLOSE_DELAY=-1

Environment (please complete the following information):

Output of uname -a or ver

Linux XXX 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.24.0, JRE 11 Linux amd64-64-Bit Compressed References 20210120_910 (JIT enabled, AOT enabled)
OpenJ9   - 345e1b09e
OMR      - 741e94ea8
JCL      - 0a86953833 based on jdk-11.0.10+9)

(also happens with HotSpot)

GraalVM version (if different from Java)

Quarkus version or git rev

1.12.2

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.6.3

Additional context


quarkusio#15940


$upstream:15940$

@snowdrop-bot snowdrop-bot added the upstream/closed The issue has been closed in the upstream repository label Mar 26, 2021
@geoand geoand closed this as completed Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository
Projects
None yet
Development

No branches or pull requests

3 participants