Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Chen2012-07-11 08:21:15 +0000
committerWilliam Chen2012-07-11 08:21:15 +0000
commit8eccc1318d084744693e65e6972c105b41193d56 (patch)
treee57508e649f56a9f1b2d697b3537eb5d695d020d /target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui
parent09e0d9fa04df8eaf63da6da60025cdfcbe8db632 (diff)
downloadorg.eclipse.tcf-8eccc1318d084744693e65e6972c105b41193d56.tar.gz
org.eclipse.tcf-8eccc1318d084744693e65e6972c105b41193d56.tar.xz
org.eclipse.tcf-8eccc1318d084744693e65e6972c105b41193d56.zip
Target Explorer: Remove FindBug warnings in File System.
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSModifiedSearchable.java10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSSizeSearchable.java10
2 files changed, 10 insertions, 10 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSModifiedSearchable.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSModifiedSearchable.java
index cbbeda24d..5521339d8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSModifiedSearchable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSModifiedSearchable.java
@@ -181,7 +181,7 @@ public class FSModifiedSearchable extends FSBaseSearchable {
*/
@Override
public boolean isInputValid() {
- if(choice == OPTION_SPECIFIED) {
+ if(choice == OPTION_SPECIFIED && txtLmFrom != null && txtLmTo != null) {
boolean vFrom = txtLmFrom.isValid();
boolean vTo = txtLmTo.isValid();
if(vFrom) {
@@ -204,7 +204,7 @@ public class FSModifiedSearchable extends FSBaseSearchable {
*/
protected void optionChecked(SelectionEvent e) {
Object src = e.getSource();
- boolean spec = false;
+ boolean specified = false;
if(src == fBtnLmNotRem) {
choice = OPTION_NOT_REMEMBER;
}
@@ -219,10 +219,10 @@ public class FSModifiedSearchable extends FSBaseSearchable {
}
else if(src == fBtnLmSpecified) {
choice = OPTION_SPECIFIED;
- spec = true;
+ specified = true;
}
- txtLmFrom.setEnabled(spec);
- txtLmTo.setEnabled(spec);
+ if (txtLmFrom != null) txtLmFrom.setEnabled(specified);
+ if (txtLmTo != null) txtLmTo.setEnabled(specified);
fireOptionChanged();
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSSizeSearchable.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSSizeSearchable.java
index 61e98d3d6..6173d53d7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSSizeSearchable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSSizeSearchable.java
@@ -184,7 +184,7 @@ public class FSSizeSearchable extends FSBaseSearchable {
*/
@Override
public boolean isInputValid() {
- if(choice == OPTION_SIZE_SPECIFIED) {
+ if(choice == OPTION_SIZE_SPECIFIED && txtSizeFrom != null && txtSizeTo != null) {
boolean vFrom = txtSizeFrom.isValid();
boolean vTo = txtSizeTo.isValid();
if(vFrom) {
@@ -207,7 +207,7 @@ public class FSSizeSearchable extends FSBaseSearchable {
*/
protected void optionChecked(SelectionEvent e) {
Object src = e.getSource();
- boolean spec = false;
+ boolean specified = false;
if(src == fBtnSizeNotRem) {
choice = OPTION_NOT_REMEMBER;
}
@@ -222,10 +222,10 @@ public class FSSizeSearchable extends FSBaseSearchable {
}
else if(src == fBtnSizeSpecified) {
choice = OPTION_SIZE_SPECIFIED;
- spec = true;
+ specified = true;
}
- txtSizeFrom.setEnabled(spec);
- txtSizeTo.setEnabled(spec);
+ if (txtSizeFrom != null) txtSizeFrom.setEnabled(specified);
+ if (txtSizeTo != null) txtSizeTo.setEnabled(specified);
fireOptionChanged();
}

Back to the top