Describe the bug
I have a simple quarkus app, in which I use BeanParam for my Get resources.
Apperantly, quarkus detects the as Beanparam annotated classes as cdi beans, see warning below.
This is not correct, since my HelloParams POJO does not have a scope set.
If I add Unremovable to the HelloParams class, the warning does not happen.
Expected behavior
This warning should not happen if the as beanparam annotated parameter does not have a scope set, i.e. is not a cdi bean.
Actual behavior
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2021-01-30 09:34:11,489 WARN [io.qua.arc.impl] (Quarkus Main Thread)
================================================================================
CDI: programmatic lookup problem detected
-----------------------------------------
At least one bean matched the required type and qualifiers but was marked as unused and removed during build
Removed beans:
- CLASS bean org.acme.HelloParams [types=[class org.acme.HelloParams], qualifiers=[@javax.enterprise.inject.Default(), @javax.enterprise.inject.Any()]]
Required type: class org.acme.HelloParams
Required qualifiers: [@javax.enterprise.inject.Default()]
Solutions:
- Application developers can eliminate false positives via the @Unremovable annotation
- Extensions can eliminate false positives via build items, e.g. using the UnremovableBeanBuildItem
- See also https://quarkus.io/guides/cdi-reference#remove_unused_beans
================================================================================
2021-01-30 09:34:11,650 INFO [io.quarkus] (Quarkus Main Thread) rr-beanparam-unremovable 1.0.0-SNAPSHOT on JVM (powered by Quarkus 1.11.1.Final) started in 0.773s. Listening on: http://localhost:8080
2021-01-30 09:34:11,650 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2021-01-30 09:34:11,650 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, resteasy-reactive]
^C2021-01-30 09:34:48,368 INFO [io.quarkus] (Shutdown thread) rr-beanparam-unremovable stopped in 0.003s
Describe the bug I have a simple quarkus app, in which I use BeanParam for my Get resources. Apperantly, quarkus detects the as Beanparam annotated classes as cdi beans, see warning below. This is not correct, since my HelloParams POJO does not have a scope set.
If I add Unremovable to the HelloParams class, the warning does not happen.
Expected behavior This warning should not happen if the as beanparam annotated parameter does not have a scope set, i.e. is not a cdi bean.
Actual behavior
To Reproduce
Steps to reproduce the behavior:
@Unremovable
to HelloParams. The warning does not happen now.Environment (please complete the following information):
uname -a
orver
: Linux martin 5.8.0-41-generic #46~20.04.1-Ubuntu SMP Mon Jan 18 17:52:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linuxjava -version
: openjdk 11.0.7 2020-04-14 LTS OpenJDK Runtime Environment Zulu11.39+15-CA (build 11.0.7+10-LTS) OpenJDK 64-Bit Server VM Zulu11.39+15-CA (build 11.0.7+10-LTS, mixed mode)mvnw --version
orgradlew --version
): Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: /home/martin/.sdkman/candidates/maven/current Java version: 11.0.7, vendor: Azul Systems, Inc., runtime: /home/martin/.sdkman/candidates/java/11.0.7-zulu Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.8.0-41-generic", arch: "amd64", family: "unix"https://github.com/quarkusio/quarkus/issues/14715
$upstream:14715$