Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2015-02-05 09:40:09 +0000
committerMarkus Tiede2015-02-05 09:40:09 +0000
commit3fa21106b7e6a8274189297364eadfe87633cff3 (patch)
tree98e4689a5229046e21dbfe14dd3d6810ec8fd0e6
parent322ba43731e7c19d12443bb3c2b00700377860e0 (diff)
downloadorg.eclipse.jubula.core-3fa21106b7e6a8274189297364eadfe87633cff3.tar.gz
org.eclipse.jubula.core-3fa21106b7e6a8274189297364eadfe87633cff3.tar.xz
org.eclipse.jubula.core-3fa21106b7e6a8274189297364eadfe87633cff3.zip
Non-sprint task - unnecessary casts removed.
-rw-r--r--org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/AUTSwingHierarchy.java6
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/components/SwtAUTHierarchy.java10
2 files changed, 6 insertions, 10 deletions
diff --git a/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/AUTSwingHierarchy.java b/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/AUTSwingHierarchy.java
index 94f7f997d..6c27b11a7 100644
--- a/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/AUTSwingHierarchy.java
+++ b/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/components/AUTSwingHierarchy.java
@@ -734,11 +734,9 @@ public class AUTSwingHierarchy extends AUTHierarchy<Component>
Validate.notNull(component, "The component must not be null"); //$NON-NLS-1$
HierarchyContainer<Component> result = null;
try {
- AUTComponent<Component> compID = (AUTComponent<Component>)
- getRealMap().get(component);
+ AUTComponent<Component> compID = getRealMap().get(component);
if (compID != null) {
- result = (HierarchyContainer<Component>)
- getHierarchyMap().get(compID);
+ result = getHierarchyMap().get(compID);
}
} catch (ClassCastException cce) {
log.error(cce);
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/components/SwtAUTHierarchy.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/components/SwtAUTHierarchy.java
index 35424d6ce..e434d8faf 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/components/SwtAUTHierarchy.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/components/SwtAUTHierarchy.java
@@ -160,8 +160,8 @@ public class SwtAUTHierarchy extends AUTHierarchy<Widget> {
// (i.e. don't try to remove it twice)
if (getRealMap().get(window) != null) {
HierarchyContainer<Widget> windowContainer =
- (HierarchyContainer<Widget>) getHierarchyMap()
- .get(getRealMap().get(window));
+ getHierarchyMap()
+ .get(getRealMap().get(window));
if (windowContainer != null) {
// remove the windowContainer from its parent in the hierarchy, if
@@ -584,8 +584,7 @@ public class SwtAUTHierarchy extends AUTHierarchy<Widget> {
final Object componentToRemove = getRealMap().get(toRemove);
if (componentToRemove != null) {
HierarchyContainer<Widget> hierarchyContainer =
- (HierarchyContainer<Widget>) getHierarchyMap()
- .remove(componentToRemove);
+ getHierarchyMap().remove(componentToRemove);
// update the hierarchy and deletes the container and component from maps
removeFromHierarchy(hierarchyContainer);
} else {
@@ -751,8 +750,7 @@ public class SwtAUTHierarchy extends AUTHierarchy<Widget> {
try {
SwtComponent compID = (SwtComponent)getRealMap().get(component);
if (compID != null) {
- result = (HierarchyContainer<Widget>)
- getHierarchyMap().get(compID);
+ result = getHierarchyMap().get(compID);
}
} catch (ClassCastException cce) {
log.error(cce);

Back to the top