]>
source.dussan.org Git - vaadin-framework.git/commit
Add fallback resolvers for CurrentInstance (#10974)
* Add fallback resolvers for CurrentInstance
This allow applications to inject custom default instances when the
current instances cannot be found by regular means.
For example, when VaadinServlet.getCurrent() would return null, a
fallback resolver could be invoked to properly create the servlet and
return it.
* Make the setting of CurrentInstanceFallbackResolvers protected
* Remove the default constructor. Improve test.
* Made setFallbackResolver public again
* Rename the method to defineFallbackResolver, and make it throw when a
type is used twice
* Make the method thread-safe
* Make the method thread-safe in a Java 6 way
* Thread safety with ConcurrentHashMap API instead of just Map
* Improve test with fake classes.
* Clear the test state after it has been run.