File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed
src/main/java/org/springframework/data Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -120,15 +120,13 @@ public CustomConversions(ConverterConfiguration converterConfiguration) {
120
120
121
121
this .converterConfiguration = converterConfiguration ;
122
122
123
- List < Object > registeredConverters = collectPotentialConverterRegistrations (
123
+ this . converters = collectPotentialConverterRegistrations (
124
124
converterConfiguration .getStoreConversions (), converterConfiguration .getUserConverters ()).stream ()
125
125
.filter (this ::isSupportedConverter ).filter (this ::shouldRegister )
126
126
.map (ConverterRegistrationIntent ::getConverterRegistration ).map (this ::register ).distinct ()
127
- .collect (Collectors .toList ());
127
+ .sorted (Collections .reverseOrder ())
128
+ .toList ();
128
129
129
- Collections .reverse (registeredConverters );
130
-
131
- this .converters = Collections .unmodifiableList (registeredConverters );
132
130
this .simpleTypeHolder = new SimpleTypeHolder (customSimpleTypes ,
133
131
converterConfiguration .getStoreConversions ().getStoreTypeHolder ());
134
132
this .propertyValueConversions = converterConfiguration .getPropertyValueConversions ();
Original file line number Diff line number Diff line change @@ -183,13 +183,14 @@ EvaluationContextExtensionInformation getOrCreateInformation(Class<? extends Eva
183
183
* @param extensions
184
184
* @return
185
185
*/
186
- private List <EvaluationContextExtensionAdapter > toAdapters (
186
+ private List <EvaluationContextExtensionAdapter > toReversedAdapters (
187
187
Collection <? extends EvaluationContextExtension > extensions ) {
188
188
189
- return extensions .stream ()//
190
- .sorted (AnnotationAwareOrderComparator .INSTANCE )//
189
+ return extensions .stream () //
190
+ .sorted (AnnotationAwareOrderComparator .INSTANCE ) //
191
191
.map (it -> new EvaluationContextExtensionAdapter (it , getOrCreateInformation (it ))) //
192
- .collect (Collectors .toList ());
192
+ .sorted (Collections .reverseOrder ()) //
193
+ .toList ();
193
194
}
194
195
195
196
/**
@@ -211,11 +212,9 @@ public ExtensionAwarePropertyAccessor(Collection<? extends EvaluationContextExte
211
212
212
213
Assert .notNull (extensions , "Extensions must not be null" );
213
214
214
- this .adapters = toAdapters (extensions );
215
+ this .adapters = toReversedAdapters (extensions );
215
216
this .adapterMap = adapters .stream ()//
216
217
.collect (Collectors .toMap (EvaluationContextExtensionAdapter ::getExtensionId , it -> it ));
217
-
218
- Collections .reverse (this .adapters );
219
218
}
220
219
221
220
@ Override
You can’t perform that action at this time.
0 commit comments