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

Found unrecommended usage of private members (use package-private instead) in framework beans #28420

Closed
Postremus opened this issue Oct 6, 2022 · 2 comments · Fixed by #28469
Labels
Milestone

Comments

@Postremus
Copy link
Member

Describe the bug

When activating debug logging for io.quarkus with the quarkus-smallrye-reactive-messaging-rabbitmq extension present, I get following output:

2022-10-06 08:32:11,419 DEBUG [io.qua.arc.pro.BeanProcessor] (build-61) Found unrecommended usage of private members (use package-private instead) in framework beans:
	- @Inject field com.activelogistics.wolf.common.log.JaxRSLoggingFilter#uriInfo,
	- @Inject field com.activelogistics.wolf.weborder.commons.security.filter.AbstractAuthorizationFilter#resourceInfo,
	- @Inject field io.smallrye.reactive.messaging.providers.connectors.WorkerPoolRegistry#configInstance,
	- @Inject field io.smallrye.reactive.messaging.providers.connectors.WorkerPoolRegistry#executionHolder,
	- @Inject field io.smallrye.reactive.messaging.rabbitmq.RabbitMQConnector#clientOptions,
	- @Inject field io.smallrye.reactive.messaging.rabbitmq.RabbitMQConnector#credentialsProviders,
	- @Inject field io.smallrye.reactive.messaging.providers.connectors.WorkerPoolRegistry#configInstance,
	- @Inject field io.smallrye.reactive.messaging.providers.connectors.WorkerPoolRegistry#executionHolder,
	- @Inject field io.smallrye.reactive.messaging.providers.impl.ConfiguredChannelFactory#publisherDecoratorInstance

These private injects should be changed to package private
https://quarkus.io/guides/cdi-reference#native-executables-and-private-members

Expected behavior

No private injects inside quarkus framework code

Actual behavior

No response

How to Reproduce?

  1. Create an app which has the quarkus-smallrye-reactive-messaging-rabbitmq dependency
  2. In application.properties:
    quarkus.log.min-level=DEBUG
    quarkus.log.category."io.quarkus".level=DEBUG
  3. mvn quarkus:dev
  4. look at the log output

Output of uname -a or ver

Microsoft Windows [Version 10.0.19044.2006]

Output of java -version

17.0.4

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.13.0.Final

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

Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home: C:\eclipse\tools\java\maven Java version: 17.0.4, vendor: Eclipse Adoptium, runtime: C:\eclipse\tools\java\17 Default locale: de_DE, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Additional information

No response

@Postremus Postremus added the kind/bug Something isn't working label Oct 6, 2022
@quarkus-bot quarkus-bot bot added env/windows Impacts Windows machines triage/needs-triage labels Oct 6, 2022
geoand added a commit to geoand/smallrye-reactive-messaging that referenced this issue Oct 6, 2022
This is done in order to avoid warnings in Quarkus
(which does support private field injection but needs
to use reflection)

Relates to: quarkusio/quarkus#28420
@geoand
Copy link
Contributor

geoand commented Oct 6, 2022

Good catch!

smallrye/smallrye-reactive-messaging#1937 takes care of it on the RM side

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 6, 2022

/cc @cescoffier, @ozangunalp

@geoand geoand removed the env/windows Impacts Windows machines label Oct 6, 2022
@quarkus-bot quarkus-bot bot added this to the 2.14 - main milestone Oct 13, 2022
@gsmet gsmet modified the milestones: 2.14 - main, 2.13.3.Final Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants