Compiler errors, after Implementation is generated #3904
trico-tillster
started this conversation in
General
Replies: 1 comment 4 replies
-
|
Hi @trico-tillster! Wow, that's a nasty bug. I created an issue for this: The only workaround I know is cumbersone: Try to isolate all your code regarding the class Something like: public class WorkaroundMapper {
OverrideDto myCustomMapping(Override override) {
// custom mapping
return null;
}
}
@Mapper(uses = WorkaroundMapper.class)
public class YourMapStructMapper {
// ....
} |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've 1 object to be mapped to another, if one of them contains a object called Override compiler fails.
This happens because generated code adds the
@Overrideannotation to the implementation method, and compiler gets confused with the import class.I've tried to search for a config to manipulate the generated annotation, something like updating it to @java.lang.Override, but I was not able.
I'm also not able to change the model Override class name to other, because this is a generated code from an external json schema.
Thought it would be helpful to mention this here.
Any clues how to solve this?
Beta Was this translation helpful? Give feedback.
All reactions