diff options
author | Uwe Stieber | 2012-08-08 10:22:46 +0000 |
---|---|---|
committer | Uwe Stieber | 2012-08-08 10:22:46 +0000 |
commit | bc6a8cf72d264cba1d7b961d97afa75f39f1d473 (patch) | |
tree | 058c4b226bae606ef2e3995b10a1a9fb8889f821 | |
parent | 331efd6b235b4719f8c8813e5c60fb023223533a (diff) | |
download | org.eclipse.tcf-bc6a8cf72d264cba1d7b961d97afa75f39f1d473.tar.gz org.eclipse.tcf-bc6a8cf72d264cba1d7b961d97afa75f39f1d473.tar.xz org.eclipse.tcf-bc6a8cf72d264cba1d7b961d97afa75f39f1d473.zip |
Target Explorer: Fix more FindBugs warnings
4 files changed, 20 insertions, 18 deletions
diff --git a/admin/findbugs-exclude.xml b/admin/findbugs-exclude.xml index 0662af4df..f5563f3e1 100644 --- a/admin/findbugs-exclude.xml +++ b/admin/findbugs-exclude.xml @@ -189,6 +189,7 @@ <Or> <Class name="org.eclipse.tcf.te.core.async.AsyncCallbackCollector"/> <Class name="org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.FileState"/> + <Class name="org.eclipse.tcf.te.ui.controls.BaseWizardConfigurationPanelControl"/> </Or> </Match> diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessOutputReaderThread.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessOutputReaderThread.java index e41f69cc3..093cda8fc 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessOutputReaderThread.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessOutputReaderThread.java @@ -83,16 +83,17 @@ public class ProcessOutputReaderThread extends Thread { * @param timeout Timeout in milliseconds to wait for (maximum). */ public void waitForFinish(long timeout) { - if (finished) return; - - waiting = true; - synchronized (waiterSemaphore) { - try { - waiterSemaphore.wait(timeout); - } catch (InterruptedException e) { - // just end the wait + if (!finished) { + waiting = true; + synchronized (waiterSemaphore) { + try { + waiterSemaphore.wait(timeout); + } catch (InterruptedException e) { + // just end the wait + } } } + return; } /** diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessStreamsListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessStreamsListener.java index 51df9e9d4..bcdb0b38c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessStreamsListener.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessStreamsListener.java @@ -557,18 +557,18 @@ public class ProcessStreamsListener implements IStreams.StreamsListener, IProces synchronized (this) { // Mark the runnable definitely stopped stopped = true; - // Disconnect is done, ignore any error, invoke the callback - if (getCallback() != null) getCallback().done(this, Status.OK_STATUS); } + // Disconnect is done, ignore any error, invoke the callback + if (getCallback() != null) getCallback().done(this, Status.OK_STATUS); } }); } else { synchronized (this) { // Mark the runnable definitely stopped stopped = true; - // Invoke the callback directly, if any - if (callback != null) callback.done(this, Status.OK_STATUS); } + // Invoke the callback directly, if any + if (callback != null) callback.done(this, Status.OK_STATUS); } } diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsStreamsListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsStreamsListener.java index d0be4f78b..ec094c2ae 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsStreamsListener.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsStreamsListener.java @@ -327,9 +327,9 @@ public class TerminalsStreamsListener implements IStreams.StreamsListener, ITerm synchronized (this) { // Mark the runnable definitely stopped stopped = true; - // Invoke the callback directly, if any - if (callback != null) callback.done(this, Status.OK_STATUS); } + // Invoke the callback directly, if any + if (callback != null) callback.done(this, Status.OK_STATUS); } } @@ -572,9 +572,9 @@ public class TerminalsStreamsListener implements IStreams.StreamsListener, ITerm synchronized (this) { // Mark the runnable definitely stopped stopped = true; - // Disconnect is done, ignore any error, invoke the callback - if (getCallback() != null) getCallback().done(this, Status.OK_STATUS); } + // Disconnect is done, ignore any error, invoke the callback + if (getCallback() != null) getCallback().done(this, Status.OK_STATUS); } }); } @@ -583,9 +583,9 @@ public class TerminalsStreamsListener implements IStreams.StreamsListener, ITerm synchronized (this) { // Mark the runnable definitely stopped stopped = true; - // Invoke the callback directly, if any - if (callback != null) callback.done(this, Status.OK_STATUS); } + // Invoke the callback directly, if any + if (callback != null) callback.done(this, Status.OK_STATUS); } } |