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

NullPointerException in build when denying unannotated endpoints #17854

Closed
andlinger opened this issue Jun 11, 2021 · 1 comment · Fixed by #17860
Closed

NullPointerException in build when denying unannotated endpoints #17854

andlinger opened this issue Jun 11, 2021 · 1 comment · Fixed by #17860
Labels
kind/bug Something isn't working
Milestone

Comments

@andlinger
Copy link
Contributor

In a project without endpoints, a NullPointerException is thrown during build if the property quarkus.security.jaxrs.deny-unannotated-endpoints is set to true.

Of course, without endpoints the property makes no sense, but probably no NullPointerException should be thrown either.

io.quarkus.builder.BuildException: Build failure: Build failed due to errors
  	[error]: Build step io.quarkus.resteasy.deployment.ResteasyBuiltinsProcessor#setUpDenyAllJaxRs threw an exception: java.lang.NullPointerException
  	at io.quarkus.resteasy.deployment.ResteasyBuiltinsProcessor.setUpDenyAllJaxRs(ResteasyBuiltinsProcessor.java:57)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
  	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
  	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
  	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2442)
  	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1476)
  	at java.base/java.lang.Thread.run(Thread.java:829)
  	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
@geoand
Copy link
Contributor

geoand commented Jun 11, 2021

Thanks for reporting!

A framework should indeed never throw a NPE!

geoand added a commit that referenced this issue Jun 11, 2021
Fix potential NPE in RESTEasy Classic build time processing
@quarkus-bot quarkus-bot bot added this to the 2.1 - main milestone Jun 11, 2021
@gsmet gsmet modified the milestones: 2.1 - main, 2.0.0.Final Jun 21, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants