Conventions lazily retrieves shared ReactiveAdapterRegistry
Issue: SPR-16981
This commit is contained in:
parent
7a02e438e7
commit
b68e692854
|
|
@ -41,8 +41,6 @@ public abstract class Conventions {
|
||||||
*/
|
*/
|
||||||
private static final String PLURAL_SUFFIX = "List";
|
private static final String PLURAL_SUFFIX = "List";
|
||||||
|
|
||||||
private static final ReactiveAdapterRegistry reactiveAdapterRegistry = ReactiveAdapterRegistry.getSharedInstance();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the conventional variable name for the supplied {@code Object}
|
* Determine the conventional variable name for the supplied {@code Object}
|
||||||
|
|
@ -116,7 +114,7 @@ public abstract class Conventions {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
valueClass = parameter.getParameterType();
|
valueClass = parameter.getParameterType();
|
||||||
|
ReactiveAdapterRegistry reactiveAdapterRegistry = ReactiveAdapterRegistry.getSharedInstance();
|
||||||
if (reactiveAdapterRegistry.hasAdapters()) {
|
if (reactiveAdapterRegistry.hasAdapters()) {
|
||||||
ReactiveAdapter adapter = reactiveAdapterRegistry.getAdapter(valueClass);
|
ReactiveAdapter adapter = reactiveAdapterRegistry.getAdapter(valueClass);
|
||||||
if (adapter != null && !adapter.getDescriptor().isNoValue()) {
|
if (adapter != null && !adapter.getDescriptor().isNoValue()) {
|
||||||
|
|
@ -205,6 +203,7 @@ public abstract class Conventions {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
valueClass = resolvedType;
|
valueClass = resolvedType;
|
||||||
|
ReactiveAdapterRegistry reactiveAdapterRegistry = ReactiveAdapterRegistry.getSharedInstance();
|
||||||
if (reactiveAdapterRegistry.hasAdapters()) {
|
if (reactiveAdapterRegistry.hasAdapters()) {
|
||||||
ReactiveAdapter adapter = reactiveAdapterRegistry.getAdapter(valueClass);
|
ReactiveAdapter adapter = reactiveAdapterRegistry.getAdapter(valueClass);
|
||||||
if (adapter != null && !adapter.getDescriptor().isNoValue()) {
|
if (adapter != null && !adapter.getDescriptor().isNoValue()) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue