Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-08-08 04:29:05 -0400
committerUwe Stieber2012-08-08 04:29:05 -0400
commita19c1e543fa9fd9020336115828e4a85e78906e3 (patch)
tree69a0f1851e8f6b90fb3a6b656c46db7c65efdb24 /target_explorer/plugins/org.eclipse.tcf.te.ui.swt
parent0561f950fe6033e1244d06b0410f95ee5b8f717c (diff)
downloadorg.eclipse.tcf-a19c1e543fa9fd9020336115828e4a85e78906e3.tar.gz
org.eclipse.tcf-a19c1e543fa9fd9020336115828e4a85e78906e3.tar.xz
org.eclipse.tcf-a19c1e543fa9fd9020336115828e4a85e78906e3.zip
Target Explorer: Fix FindBugs warnings
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.ui.swt')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/SWTControlUtil.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/nls/Messages.java4
2 files changed, 2 insertions, 4 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/SWTControlUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/SWTControlUtil.java
index 0037fe080..f9f292fdf 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/SWTControlUtil.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/SWTControlUtil.java
@@ -700,7 +700,7 @@ public final class SWTControlUtil {
if (image == null || image.getImageData().data == null) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
image = makeShot(shell, checked||grayed, grayed, enabled);
- if (image != null && image.getImageData().data != null) {
+ if (image.getImageData().data != null) {
JFaceResources.getImageRegistry().put(key, image);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/nls/Messages.java
index 1161f869f..d6e6a53ad 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/nls/Messages.java
@@ -40,9 +40,7 @@ public class Messages extends NLS {
if (key != null) {
try {
Field field = Messages.class.getDeclaredField(key);
- if (field != null) {
- return (String)field.get(null);
- }
+ return (String)field.get(null);
} catch (Exception e) { /* ignored on purpose */ }
}

Back to the top