-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ResteasyCommonProcessor: NullPointerException in case of using default annotation values for @Produces
or @Consumes
#14418
Comments
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Jan 20, 2021
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Jan 20, 2021
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Jan 20, 2021
gsmet
added a commit
that referenced
this issue
Jan 20, 2021
Avoid potential NPE when collecting RESTEasy Providers on Resource methods
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Jan 21, 2021
@geoand I can still reproduce this when annotating a resource class, e.g. @Produces
@Path("__test")
public static class TestResource {
@GET
@Path("testing")
public Response getTest() {
return Response.ok().build();
}
} |
What version are you seeing the problem with? |
@geoand |
To be clear, you totally fixed it for |
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Jan 19, 2022
Thanks for the reproducer! #23019 takes care of it |
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Jan 19, 2022
…asses Addresses: quarkusio#14418 (comment) (cherry picked from commit e104aa1)
geoand
added a commit
that referenced
this issue
Jan 20, 2022
Avoid potential NPE when collecting RESTEasy Providers on Resource classes
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Jan 21, 2022
…asses Addresses: quarkusio#14418 (comment) (cherry picked from commit e104aa1)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Hello. I'm getting a
NullPointerException
if I try to run a test for a simple web service with@Produces
or@Consumes
annotations default values.Here is an example of such method:
And the class itself:
https://github.com/HardNorth/service-merge-validate/blob/c8952c753a693f287ce9655a8e55f34af4ea72d3/src/main/java/net/hardnorth/github/merge/api/MergeValidateController.java
Expected behavior
No exception. A test passes.
Actual behavior
To Reproduce
It will be enough to write a test on the following method:
The test:
Steps to reproduce the behavior:
Configuration
Here is my pom.xml file: https://github.com/HardNorth/service-merge-validate/blob/620c7ab336081db67cf6eab89c976f626ec67516/pom.xml
I'm using quarkus version
1.11.0.Final
, the latest one on the moment I created the bug.Screenshots
![image](https://user-images.githubusercontent.com/4364466/105136791-4c6a5a80-5b03-11eb-91c4-1edd7155f218.png)
Well, OK :)
Environment (please complete the following information):
uname -a
orver
: Microsoft Windows 10 Home - 10.0.19042 N/A Build 19042java -version
:openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
mvnw --version
orgradlew --version
):Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Users\delgr.m2\wrapper\dists\apache-maven-3.6.3-bin\1iopthnavndlasol9gbrbg6bf2\apache-maven-3.6.3
Java version: 11, vendor: Oracle Corporation, runtime: c:\java\openjdk_11
Default locale: en_US, platform encoding: Cp1251
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Additional context
Well, as far as I digged into the problem the most probable culprit is
jandex
since it looks like it returns an instance ofAnnotationInstance
class withnull
inAnnotationValue
field. That's definetely incorrect since Annotations can't have null fields. But I do not have all the details how quarkus usesjandex
to post a bug on it, so please re-route the issue if I'm right here.The text was updated successfully, but these errors were encountered: