TransactionSynchronization does not support @Order (just Ordered interface)

See gh-21725
This commit is contained in:
Juergen Hoeller 2021-05-11 15:45:05 +02:00
parent 6aaf7596c0
commit 7f670bbe68
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2020 the original author or authors. * Copyright 2002-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -28,7 +28,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.core.NamedThreadLocal; import org.springframework.core.NamedThreadLocal;
import org.springframework.core.annotation.AnnotationAwareOrderComparator; import org.springframework.core.OrderComparator;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
@ -320,7 +320,7 @@ public abstract class TransactionSynchronizationManager {
else { else {
// Sort lazily here, not in registerSynchronization. // Sort lazily here, not in registerSynchronization.
List<TransactionSynchronization> sortedSynchs = new ArrayList<>(synchs); List<TransactionSynchronization> sortedSynchs = new ArrayList<>(synchs);
AnnotationAwareOrderComparator.sort(sortedSynchs); OrderComparator.sort(sortedSynchs);
return Collections.unmodifiableList(sortedSynchs); return Collections.unmodifiableList(sortedSynchs);
} }
} }