Hi,
On Wed, Jun 10, 2009 at 4:14 PM, Thilo Goetz<[email protected]> wrote:
> It's used only in one place in our code. Maybe it could be eliminated.
Based on a quick look it seems like the whole SwingWorker class is
overkill for this usage since the get() method is never called. A
normal Thread should do just fine, see the patch below.
BR,
Jukka Zitting
Index: uimaj-tools/src/main/java/org/apache/uima/tools/cpm/CpmPanel.java
===================================================================
--- uimaj-tools/src/main/java/org/apache/uima/tools/cpm/CpmPanel.java
(Revision
783374)
+++ uimaj-tools/src/main/java/org/apache/uima/tools/cpm/CpmPanel.java
(Arbeitskopie)
@@ -707,11 +707,10 @@
statusLabel.setText("Initializing");
// logDialog.clear();
progressBar.setValue(0);
-
- final SwingWorker worker = new SwingWorker() {
- public Object construct() {
- startProcessing();
- return null;
+
+ Thread worker = new Thread() {
+ public void run() {
+ startProcessing();
}
};
worker.start();