Both configs should be merged; web.xml should have priority. And thus, the build should accept this filter and configure an url-pattern of "/blah/*"
This is how it works in many other servlet containers to my knowledge.
Actual behavior
The build fails with this exception because the @WebFilter annotation does not define an urlMapping:
Build failure: Build failed due to errors
[error]: Build step io.quarkus.undertow.deployment.UndertowBuildStep#build threw an exception: java.lang.NullPointerException
at io.quarkus.undertow.deployment.UndertowBuildStep.build(UndertowBuildStep.java:420)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:932)
at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:479)
Environment (please complete the following information):
Quarkus version or git rev: 1.7.0.Final
Build tool (ie. output of mvnw --version or gradlew --version): gradle
Describe the bug I have a servlet filter without an explicit url mapping:
And i have a web.xml with a mapping:
Expected behavior
Both configs should be merged; web.xml should have priority. And thus, the build should accept this filter and configure an url-pattern of "/blah/*"
This is how it works in many other servlet containers to my knowledge.
Actual behavior
The build fails with this exception because the @WebFilter annotation does not define an urlMapping:
Build failure: Build failed due to errors [error]: Build step io.quarkus.undertow.deployment.UndertowBuildStep#build threw an exception: java.lang.NullPointerException at io.quarkus.undertow.deployment.UndertowBuildStep.build(UndertowBuildStep.java:420) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:932) at io.quarkus.builder.BuildContext.run(BuildContext.java:277) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:479)
Environment (please complete the following information):
mvnw --version
orgradlew --version
): gradle