mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-1797 removed unused DataTypeConflictException
This commit is contained in:
parent
0acb497263
commit
01067debde
56 changed files with 172 additions and 365 deletions
|
@ -207,8 +207,7 @@ public class DataTypeMarkupType extends VTMarkupType {
|
|||
|
||||
private boolean setDataType(Program program, Address startAddress, DataType dataType,
|
||||
int dataLength, VTMatchApplyChoices.ReplaceDataChoices replaceChoice)
|
||||
throws CodeUnitInsertionException, DataTypeConflictException,
|
||||
VersionTrackingApplyException {
|
||||
throws CodeUnitInsertionException, VersionTrackingApplyException {
|
||||
|
||||
Listing listing = program.getListing();
|
||||
// For now this will only clear the code unit at the address.
|
||||
|
@ -273,10 +272,6 @@ public class DataTypeMarkupType extends VTMarkupType {
|
|||
tryToRestoreOriginalData(listing, startAddress, originalDataType, originalDataLength);
|
||||
throw e;
|
||||
}
|
||||
catch (DataTypeConflictException e) {
|
||||
tryToRestoreOriginalData(listing, startAddress, originalDataType, originalDataLength);
|
||||
throw e;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -293,13 +288,6 @@ public class DataTypeMarkupType extends VTMarkupType {
|
|||
" after failing to set data type markup at " + address.toString() + ".\n" +
|
||||
e2.getMessage());
|
||||
}
|
||||
catch (DataTypeConflictException e2) {
|
||||
// If we get an error trying to put the original back then dump a message and bail out.
|
||||
Msg.error(this,
|
||||
"Couldn't restore data type of " + originalDataType.getName() +
|
||||
" after failing to set data type markup at " + address.toString() + ".\n" +
|
||||
e2.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -349,11 +337,6 @@ public class DataTypeMarkupType extends VTMarkupType {
|
|||
sourceDataLength, replaceChoice);
|
||||
}
|
||||
catch (CodeUnitInsertionException e) {
|
||||
|
||||
throw new VersionTrackingApplyException(getApplyFailedMessage(sourceAddress,
|
||||
destinationAddress, e, sourceDataLength, destinationData.getLength()), e);
|
||||
}
|
||||
catch (DataTypeConflictException e) {
|
||||
throw new VersionTrackingApplyException(getApplyFailedMessage(sourceAddress,
|
||||
destinationAddress, e, sourceDataLength, destinationData.getLength()), e);
|
||||
}
|
||||
|
@ -408,10 +391,6 @@ public class DataTypeMarkupType extends VTMarkupType {
|
|||
throw new VersionTrackingApplyException("Couldn't unapply data type markup @ " +
|
||||
destinationAddress.toString() + "." + e.getMessage() + ".", e);
|
||||
}
|
||||
catch (DataTypeConflictException e) {
|
||||
throw new VersionTrackingApplyException("Couldn't unapply data type markup @ " +
|
||||
destinationAddress.toString() + "." + e.getMessage() + ".", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -15,9 +15,8 @@
|
|||
*/
|
||||
package ghidra.feature.vt.api;
|
||||
|
||||
import static ghidra.feature.vt.db.VTTestUtils.addr;
|
||||
import static ghidra.feature.vt.db.VTTestUtils.createMatchSetWithOneDataMatch;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static ghidra.feature.vt.db.VTTestUtils.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
@ -157,7 +156,7 @@ public class VTMatchAcceptTest extends AbstractGhidraHeadedIntegrationTest {
|
|||
}
|
||||
|
||||
private Data setData(DataType dataType, int dtLength, Address address, Program program)
|
||||
throws CodeUnitInsertionException, DataTypeConflictException {
|
||||
throws CodeUnitInsertionException {
|
||||
|
||||
Listing listing = program.getListing();
|
||||
Data data = null;
|
||||
|
|
|
@ -1847,7 +1847,7 @@ public class VTMatchApplyTest extends AbstractGhidraHeadedIntegrationTest {
|
|||
}
|
||||
|
||||
private Data setData(DataType dataType, int dtLength, Address address, Program program)
|
||||
throws CodeUnitInsertionException, DataTypeConflictException {
|
||||
throws CodeUnitInsertionException {
|
||||
|
||||
Listing listing = program.getListing();
|
||||
Data data = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue