It would be nice if the annotation processor had caught the problem fixed by https://github.com/spring-projects/spring-boot/pull/24851. Perhaps it could check that the types can be loaded when merging in the additional metadata.
Comment From: dreis2211
I guess it will always choke up on the following:
{
"name": "spring.flyway.error-handlers",
"type": "org.flywaydb.core.api.errorhandler.ErrorHandler[]",
"deprecation": {
"level": "error",
"reason": "Flyway pro edition only."
}
},
This particular property was deprecated in 2.1.0 I think, so one could argue that this could be removed (or don't we do that at all?). Alternatively, the potential check could only cover non-deprecated stuff. I wanted to get it out of my head, because I saw that one as well after fixing my issue ;-)
EDIT: Another idea I had was to only limit the type check to java.* as those types should be available.
Comment From: wilkinsona
I had a feeling we might hit a few problems like that. I'm not sure how best to handle them. Both your ideas are worth exploring. Thanks for those. Another might be to provide support for an allowlist that can be configured with any types that are known to be good but aren't on the classpath. Annotation processors aren't particularly easy to configure, though.
Comment From: snicoll
Checking for java.* would be better than nothing although doing it for only a sub-set of the available types feels a bit odd.