byte-buddy
byte-buddy copied to clipboard
BUG: instrumentation error
@raphw
lombok.NonNull
@Override
public Collection<?> fuzzyQueryCity(@NonNull String name) {
}
@Override
public Map<Long, CityBasicData> batchSearchCity(@NonNull List<Long> IdList, @NonNull String language) {
}
When I try to modify this method (batchSearchCity), the following exception is thrown. What is the reason?
ERROR TransformListener - onError: loaded: false from classLoader ParallelWebappClassLoader
context: ROOT
delegate: false
----------> Parent Classloader:
, throwable: java.lang.IllegalStateException: Illegal type annotations on parameter java.lang.String arg0 for public java.util.Collection fuzzyQueryCity(java.lang.String)
I assume this is a Lombock issue. The exception states what the issue is. You can ignore this if you only want to decorate classes (apply Advice) by setting DECORATE as a type strategy.
@raphw My question is why this type of method cannot be decorated.
Byte Buddy resolves the type to a type description. Doing so it discovers that fuzzyQueryCity(java.lang.String) has a type annotation on its first parameter that is not legally defined to be added on a parameter.