mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-25 17:00:36 -09:00
Merge remote-tracking branch 'origin/GP-1025_Dan_ParameterMapOrder' into Ghidra_10.0
This commit is contained in:
@@ -201,7 +201,10 @@ public interface TargetMethod extends TargetObject {
|
||||
* @return a map of descriptions by name
|
||||
*/
|
||||
static TargetParameterMap makeParameters(Stream<ParameterDescription<?>> params) {
|
||||
return TargetParameterMap.copyOf(params.collect(Collectors.toMap(p -> p.name, p -> p)));
|
||||
return TargetParameterMap
|
||||
.copyOf(params.collect(Collectors.toMap(p -> p.name, p -> p, (a, b) -> {
|
||||
throw new IllegalArgumentException("duplicate parameters: " + a + " and " + b);
|
||||
}, LinkedHashMap::new)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -204,7 +204,7 @@ public enum CollectionUtils {
|
||||
protected final Map<K, V> wrapped;
|
||||
|
||||
public AbstractNMap(Map<K, V> map) {
|
||||
this.wrapped = Map.copyOf(map);
|
||||
this.wrapped = Collections.unmodifiableMap(new LinkedHashMap<>(map));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user