quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.88k stars 2.71k forks source link

use package-private warning when using REST Data with Panache #13895

Closed eliaharm closed 3 years ago

eliaharm commented 3 years ago

Describe the bug compiler warning:

INFO  [io.qua.arc.pro.BeanProcessor] (build-6) Found unrecommended usage of private members (use package-private instead) in application beans:
        - @Inject field org.acme.autorest.CountriesResourceJaxRs_0fccf8a7cc91a16f62fff01e3dbc87f01f43565c#resource,
        - @Inject field org.acme.autorest.ServiceCategoriesResourceJaxRs_9f5b7a023b47285e2816e5f41f317dc105ea194a#resource,

Expected behavior No warnings

Actual behavior Could not fix the code to remove warning given that no private members were declared in class CountriesResource...

To Reproduce

pom.xml

    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-hibernate-orm-rest-data-panache</artifactId>
    </dependency>

CountriesResource.java

package org.acme.autorest;

import java.util.List;
import org.acme.jpa.*;
import io.quarkus.hibernate.orm.rest.data.panache.PanacheEntityResource;
import io.quarkus.panache.common.Page;
import io.quarkus.panache.common.Sort;
import io.quarkus.rest.data.panache.MethodProperties;
import io.quarkus.rest.data.panache.ResourceProperties;

@ResourceProperties(hal = false, path = "api/v1/countries", paged = false)
public interface CountriesResource extends PanacheEntityResource<TCountries, Integer> {

  @MethodProperties(path = "all")
  List<TCountries> list(Page page, Sort sort);

  @MethodProperties(exposed = true)
  boolean delete(Integer id);
}

Configuration

# Add your application.properties here, if applicable.

Screenshots (If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

Additional context (Add any other context about the problem here.)

ghost commented 3 years ago

/cc @FroMage, @loicmathieu

loicmathieu commented 3 years ago

/cc @gytis

gytis commented 3 years ago

@loicmathieu assign this to me, I'll fix it.

loicmathieu commented 3 years ago

@gytis it's all yours ;)

gytis commented 3 years ago

@loicmathieu this seems to have been fixed here https://github.com/quarkusio/quarkus/commit/94803d76174ac181ce79a0390f9896cff1645dff by George

loicmathieu commented 3 years ago

Yes, this has been fied by #14149, I'm closing it.