Changeset 567


Ignore:
Timestamp:
12/29/09 09:22:34 (2 years ago)
Author:
octorian
Message:

Changed some invokeAndWait instances to synchronizing on the event lock

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/J2MEUnit/src/j2meunit/rimui/TestConsoleScreen.java

    r566 r567  
    214214 
    215215    public synchronized void addError(Test test, Throwable throwable) { 
    216         UiApplication.getUiApplication().invokeAndWait(new Runnable() { 
    217             public void run() { 
    218                 errorLabel.setText("Errors: " + testResults.errorCount()); 
    219             } 
    220         }); 
     216        synchronized(UiApplication.getEventLock()) { 
     217            errorLabel.setText("Errors: " + testResults.errorCount()); 
     218        } 
    221219    } 
    222220     
    223221    public synchronized void addFailure(Test test, AssertionFailedError assertionFailedError) { 
    224         UiApplication.getUiApplication().invokeAndWait(new Runnable() { 
    225             public void run() { 
    226                 failureLabel.setText("Failures: " + testResults.failureCount()); 
    227             } 
    228         }); 
     222        synchronized(UiApplication.getEventLock()) { 
     223            failureLabel.setText("Failures: " + testResults.failureCount()); 
     224        } 
    229225    } 
    230226     
    231227    public void endTest(Test test) { 
    232         UiApplication.getUiApplication().invokeAndWait(new Runnable() { 
    233             public void run() { 
    234                 progressGauge.setValue(progressGauge.getValue() + 1); 
    235             } 
    236         }); 
     228        synchronized(UiApplication.getEventLock()) { 
     229            progressGauge.setValue(progressGauge.getValue() + 1); 
     230        } 
    237231        updateTreeErrors(); 
    238232        updateTestBranch(test); 
     
    241235     
    242236    public void endTestStep(Test test) { 
    243         UiApplication.getUiApplication().invokeAndWait(new Runnable() { 
    244             public void run() { 
    245                 progressGauge.setValue(progressGauge.getValue() + 1); 
    246             } 
    247         }); 
     237        synchronized(UiApplication.getEventLock()) { 
     238            progressGauge.setValue(progressGauge.getValue() + 1); 
     239        } 
    248240        updateTreeErrors(); 
    249241        updateTestBranch(test); 
Note: See TracChangeset for help on using the changeset viewer.