mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-22 04:05:39 +00:00
GT-2698 fix a bad test
Test was comparing classes backwards.
This commit is contained in:
parent
1f36a7616c
commit
5764e7174e
@ -730,14 +730,14 @@ public class DiffTestAdapter extends AbstractGhidraHeadedIntegrationTest {
|
||||
performAction(action);
|
||||
}
|
||||
|
||||
Component getComponentOfType(Container container, Class<?> componentClass) {
|
||||
<T extends Component> T getComponentOfType(Container container, Class<T> componentClass) {
|
||||
Component[] comps = container.getComponents();
|
||||
for (Component element : comps) {
|
||||
if (element.getClass().isAssignableFrom(componentClass)) {
|
||||
return element;
|
||||
if (componentClass.isInstance(element)) {
|
||||
return componentClass.cast(element);
|
||||
}
|
||||
else if (element instanceof Container) {
|
||||
Component subComp = getComponentOfType((Container) element, componentClass);
|
||||
T subComp = getComponentOfType((Container) element, componentClass);
|
||||
if (subComp != null) {
|
||||
return subComp;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user