Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: instrumentation error #1587

Open
YongwuHe opened this issue Feb 2, 2024 · 3 comments
Open

BUG: instrumentation error #1587

YongwuHe opened this issue Feb 2, 2024 · 3 comments
Assignees
Labels
Milestone

Comments

@YongwuHe
Copy link

YongwuHe commented Feb 2, 2024

@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)
@raphw
Copy link
Owner

raphw commented Feb 2, 2024

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 raphw self-assigned this Feb 2, 2024
@raphw raphw added the question label Feb 2, 2024
@raphw raphw added this to the 1.14.11 milestone Feb 2, 2024
@YongwuHe
Copy link
Author

YongwuHe commented Feb 4, 2024

@raphw
My question is why this type of method cannot be decorated.

@raphw
Copy link
Owner

raphw commented Feb 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants