You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@MinimalWebConfiguration
@ApplicationPath("/rest")
@Path("/message")
public static class Application extends ResourceConfig {
Application() {
register(Application.class);
}
@GET
public Message message() {
return new Message("Jersey", null);
}
static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
Making Application package private will cause the method visibility checks to kick in on message(). Yet, this method cannot be made package private as it is required to be public.
@Service
public static class DateService {
@Cacheable(cacheNames = "test")
public Long getDate(boolean arg) {
return System.nanoTime();
}
}
@Cacheable only works on public methods, so we can't change this here either.
I wonder if we should extend the MethodVisibilityChecks to check for some more annotations, but that might be cumbersome.
I've only checked a couple of modules so far, but I suspect more problems with some of the tests that do serialization and make use of inner classes and don't have any annotation, so the only option there would be to suppress the checks.
I seem to remember we had a few of those in the past and the only option was to exclude them from checkstyle. Perhaps it's best if we leave things alone for now.
See spring-projects/spring-boot#19395
The text was updated successfully, but these errors were encountered: