GP-0 Added assertion check for datatype replacement

This commit is contained in:
ghidra1 2024-02-13 18:49:37 -05:00
parent 4f95fdd111
commit d3fbdbe0a3

View file

@ -2431,6 +2431,11 @@ abstract public class DataTypeManagerDB implements DataTypeManager {
* @param replacementDataType datatype which is the replacement
*/
protected void addDataTypeToReplace(DataType oldDataType, DataType replacementDataType) {
Objects.requireNonNull(oldDataType);
Objects.requireNonNull(replacementDataType);
if (oldDataType == replacementDataType) {
throw new AssertionError("Invalid datatype replacement pair");
}
typesToReplace.add(new Pair<>(oldDataType, replacementDataType));
}