Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-05-02 11:03:36 -0400
committerUwe Stieber2012-05-02 11:03:36 -0400
commit15f5337bd147a5f065dfa380b0686fff32741353 (patch)
treed15d3d54444533223a80d5d9001862dfc0888402 /target_explorer/plugins/org.eclipse.tcf.te.ui.swt
parent7475e3f8d57d29a299be6ddc39f85083cb067b6c (diff)
downloadorg.eclipse.tcf-15f5337bd147a5f065dfa380b0686fff32741353.tar.gz
org.eclipse.tcf-15f5337bd147a5f065dfa380b0686fff32741353.tar.xz
org.eclipse.tcf-15f5337bd147a5f065dfa380b0686fff32741353.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/listener/AbstractCheckBoxCellPaintListener.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/nls/Messages.java18
2 files changed, 1 insertions, 19 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractCheckBoxCellPaintListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractCheckBoxCellPaintListener.java
index 4dec98884..3dfafddd1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractCheckBoxCellPaintListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractCheckBoxCellPaintListener.java
@@ -71,7 +71,7 @@ public abstract class AbstractCheckBoxCellPaintListener extends AbstractCellPain
// Check which image to paint
int state = getCheckBoxState(item.getData(), columnIndex);
if (state >= 0) {
- return SWTControlUtil.getCheckBoxImage((state & CHECKED) > 0, (state & TRISTATE) > 0, (state & ENABLED) > 0);
+ return SWTControlUtil.getCheckBoxImage((state & CHECKED) != 0, (state & TRISTATE) != 0, (state & ENABLED) != 0);
}
}
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 a5b418f7e..6f9d3fad0 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
@@ -30,24 +30,6 @@ public class Messages extends NLS {
}
/**
- * Returns if or if not this NLS manager contains a constant for
- * the given externalized strings key.
- *
- * @param key The externalized strings key or <code>null</code>.
- * @return <code>True</code> if a constant for the given key exists, <code>false</code> otherwise.
- */
- public static boolean hasString(String key) {
- if (key != null) {
- try {
- Field field = Messages.class.getDeclaredField(key);
- return field != null;
- } catch (NoSuchFieldException e) { /* ignored on purpose */ }
- }
-
- return false;
- }
-
- /**
* Returns the corresponding string for the given externalized strings
* key or <code>null</code> if the key does not exist.
*

Back to the top