I don't have much expertise on Scala but looking into it a bit, Scala doesn't seem to ignore missing meta-annotated classes when it's used on return types (it seems okay when it's used on parameters) unlike Java. Micrometer's @Nullable
implementation is the same as the implementation of the Spring framework. So if you use StringUtils.quoteIfString()
from the Spring framework, you will see the same warning.
It's a warning, not an error, so you can simply ignore it or if it bothers you, you can add the following optional dependency as a workaround:
libraryDependencies += "com.google.code.findbugs" % "jsr305" % "3.0.2" % Optional
Someone who is a Scala developer might give you a better advice.
FTR this is copied from https://github.com/micrometer-metrics/micrometer/issues/1133#issuecomment-452434205.
UPDATED
I missed the "error" part. You seem to have "-Xfatal-warnings" compiler option.