Provide access to LazyConstant via internal fallback module#9241
Provide access to LazyConstant via internal fallback module#9241mbien wants to merge 1 commit intoapache:masterfrom
Conversation
|
I'm a fan of the various forms of My inclination would be towards putting this in |
there is a good chance that this module won't grow because this trick does only work if the surface of the covered API is tiny and the fallback is simple enough. We could rename it and make it less generic - I wasn't sure either. Maybe something else will show up?
The general idea is to remove the indirection (in this case the module) once no longer needed and replace usage with the JDK api (would be very simple search/replace). I am not sure if it is possible to export a single package only for friends while having also normal public API (openide.util) - thats why I put it into a separate module instead of an existing one.
JDK itself uses the feature already for quite a while in form of the I don't think that everything we use should also be public. |
6d47ba6 to
d0515b6
Compare
No, but the point was I'm in favour of making this public API. It can be deprecated if/when it can be replaced, and will still help with migrating things away from things like class-holder idiom now. |
- introduces "JDK Fallbacks" module for internal use only - module delegates to JDK implementations if available and uses fallbacks if not - the accessors are meant to be temporary friend API with expiration date, only to bridge the gap between lower and upper runtime requirements
d0515b6 to
b32fc4a
Compare
namespace and module location can probably be improved. It would be also good to find some usage candidates and add a reference commit before merge.
draft for feedback