Skip to content

feat:#2773#2969

Closed
chenzijia12300 wants to merge 21 commits intomapstruct:mainfrom
chenzijia12300:feat2773
Closed

feat:#2773#2969
chenzijia12300 wants to merge 21 commits intomapstruct:mainfrom
chenzijia12300:feat2773

Conversation

@chenzijia12300
Copy link
Contributor

Try to implement feat: #2773

chenzijia12300 and others added 16 commits August 16, 2022 15:24
…ep-method-annotations

# Conflicts:
#	processor/src/main/java/org/mapstruct/ap/internal/model/MappingMethod.java
#	processor/src/main/resources/org/mapstruct/ap/internal/model/BeanMappingMethod.ftl
#	processor/src/main/resources/org/mapstruct/ap/internal/model/IterableMappingMethod.ftl
#	processor/src/main/resources/org/mapstruct/ap/internal/model/MapMappingMethod.ftl
#	processor/src/main/resources/org/mapstruct/ap/internal/model/StreamMappingMethod.ftl
#	processor/src/test/java/org/mapstruct/ap/test/bugs/_2773/Issue2773Test.java
Copy link
Member

@filiphr filiphr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes @chenzijia12300.

I've left some comments. Something more general, I do not think that adding a default deprecatedMethod to the top level Method is the right approach for this. While reviewing this one I realised that we are missing some things for annotations in other methods and I opened #2983.

Sorry, but we'll need to wait a bit before we can integrate this one. Would you be interested in working on some other issue in the meantime?

@chenzijia12300
Copy link
Contributor Author

@filiphr Thank you for reviewing my code and pointing out the relevant bad code, I'm happy to deal with other issues

@filiphr
Copy link
Member

filiphr commented Aug 28, 2022

I think that we can finally come back to this one @chenzijia12300 and I think that doing it from scratch would be the best.

I think that the best solution for this is to do this in AdditionalAnnotationsBuilder by overriding the getProcessedAnnotations method and adding the @Deprecated if the Element is annotated with @Deprecate. You won't need to do any other changes then I believe, since everything will be handled properly by the new logic you added in #2986.

Do you agree with this @chenzijia12300?

@chenzijia12300
Copy link
Contributor Author

@filiphr Sounds like a great idea, I'll try to implement it

@filiphr
Copy link
Member

filiphr commented Aug 29, 2022

Closing this PR in favour of #2996

@filiphr filiphr closed this Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants