uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thilo Goetz <twgo...@gmx.de>
Subject Re: SwingWorker class in uimaj-tools
Date Fri, 12 Jun 2009 15:54:11 GMT
Thilo Goetz wrote:
> Jukka Zitting wrote:
>> Hi,
>>
>> On Wed, Jun 10, 2009 at 4:14 PM, Thilo Goetz<twgoetz@gmx.de> 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.
> 
> Excellent, thanks Jukka.  Unless someone beats me to it, I
> will verify this fix later this week and commit it (and delete
> the SwingWorker class from SVN).

Fix verified and committed:
https://issues.apache.org/jira/browse/UIMA-1380

> 
> --Thilo
> 
>> 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();


Mime
View raw message