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

Undeprecate TypeVariableMap methods on GenericTypeResolver [SPR-15429] #19990

Closed
spring-issuemaster opened this issue Apr 10, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Apr 10, 2017

Oliver Drotbohm opened SPR-15429 and commented

This commit has removed methods on GenericTypeResolver that the TypeInformation abstraction in Spring Data relies on. The removal breaks our code without any suitable alternatives for those removed methods in place.

It would be cool if ….getTypeVariableMap(…) and ….resolveType(Class, Map) could be reintroduced.


Affects: 4.3.7, 5.0 RC1

Issue Links:

  • DATACMNS-1038 java.lang.NoSuchMethodError: org.springframework.core.GenericTypeResolver.getTypeVariableMap(Ljava/lang/Class;)Ljava/util/Map; ("is depended on by")

Referenced from: commits 7fbc20e, 93fac88

3 votes, 7 watchers

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 10, 2017

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 11, 2017

Juergen Hoeller commented

I'm not totally happy with reintroducing those, but if Spring Data strategically relies on them, we need to have them back in non-deprecated form... and undeprecate them in 4.3.x as well.

Note that those methods have been deprecated for 3.5 years. We reserve the right to remove all deprecated methods in 5.0 and are generally rather aggressive in this. If anybody keeps using deprecated methods on a longer-term basis, then please let us know upfront and don't just escalate it once those methods are actually gone. In other words, please double-check your use of @SuppressWarnings("deprecation") against core Spring API!

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 11, 2017

Oliver Drotbohm commented

Agreed, I think we just have been fooled by the hints in the deprecation message that recommend to use ResolvableType where this type doesn't actually provide an adequate replacement for the deprecated methods and us sort of expecting those replacements would be introduced at some point in time.

I am happy to give the attempt to replace our APIs relying on those methods with ResolvableType, it just seems a quite far reaching effort right now so that I'd like to not open this box for our 2.0 release anymore.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 11, 2017

Martin Gerlach commented

Another possibility for (deprecated) methods that are used by certain external dependencies only would have been to move those methods over to the using project, Spring Data in this case, make them package-private there and eventually replace them by better code if necessary/desired.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 11, 2017

Oliver Drotbohm commented

The implementation of the methods needed unfortunately uses package private API of ResolvableType which — according to Jürgen — is supposed to stay package private as it seems to be the approach with less public API to maintain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.