mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CallMapper, SimplifyStreamApiCallChainsInspection: use LinkedHashMap for deterministic behavior
This commit is contained in:
+1
-1
@@ -200,7 +200,7 @@ public class SimplifyStreamApiCallChainsInspection extends AbstractBaseJavaLocal
|
||||
.select(PsiMethodCallExpression.class)
|
||||
.mapToEntry(CALL_TO_FIX_MAPPER::mapFirst)
|
||||
.nonNullValues()
|
||||
.toMap();
|
||||
.toCustomMap(LinkedHashMap::new);
|
||||
for (Map.Entry<PsiMethodCallExpression, CallChainSimplification> entry : callToSimplification.entrySet()) {
|
||||
if(entry.getKey().isValid()) {
|
||||
PsiElement replacement = entry.getValue().simplify(entry.getKey());
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ import one.util.streamex.StreamEx;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
@@ -34,7 +34,7 @@ import java.util.stream.Stream;
|
||||
* @author Tagir Valeev
|
||||
*/
|
||||
public class CallMapper<T> {
|
||||
private final Map<String, List<CallHandler<T>>> myMap = new HashMap<>();
|
||||
private final Map<String, List<CallHandler<T>>> myMap = new LinkedHashMap<>();
|
||||
|
||||
public CallMapper() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user