This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 186636
Collapse All | Expand All

(-)a/api.progress/src/org/netbeans/modules/progress/spi/InternalHandle.java (+3 lines)
Lines 156-161 Link Here
156
    }
156
    }
157
    
157
    
158
    public synchronized void toSilent(String message) {
158
    public synchronized void toSilent(String message) {
159
        if (state == STATE_FINISHED) {
160
            return;
161
        }
159
        if (state != STATE_RUNNING && state != STATE_REQUEST_STOP) {
162
        if (state != STATE_RUNNING && state != STATE_REQUEST_STOP) {
160
            assert false : "cannot switch to silent mode when not running";
163
            assert false : "cannot switch to silent mode when not running";
161
        }
164
        }
(-)a/api.progress/test/unit/src/org/netbeans/api/progress/ProgressHandleTest.java (-2 / +8 lines)
Lines 207-214 Link Here
207
        assertEquals("test1", main.getText());
207
        assertEquals("test1", main.getText());
208
        assertEquals("message1", detail.getText());
208
        assertEquals("message1", detail.getText());
209
    }
209
    }
210
    
210
211
    
211
    public void testCanSwitchToSuspendLater() {
212
        proghandle.start();
213
        proghandle.finish();
214
        proghandle.suspend("I am late, but I want suspend");
215
        assertEquals("Remains finished", InternalHandle.STATE_FINISHED, handle.getState());
216
    }
217
212
    // tasks shorter than the InternalHandle.INITIAL_DELAY should be discarded.
218
    // tasks shorter than the InternalHandle.INITIAL_DELAY should be discarded.
213
    @RandomlyFails // NB-Core-Build #1210
219
    @RandomlyFails // NB-Core-Build #1210
214
    public void testIfShortOnesGetDiscarded() throws Exception {
220
    public void testIfShortOnesGetDiscarded() throws Exception {
(-)a/core.ui/src/org/netbeans/core/ui/warmup/MenuWarmUpTask.java (-5 / +1 lines)
Lines 256-266 Link Here
256
                @Override
256
                @Override
257
                public void run() {
257
                public void run() {
258
                    if (EventQueue.isDispatchThread()) {
258
                    if (EventQueue.isDispatchThread()) {
259
                        try {
259
                        h.suspend(NbBundle.getMessage(MenuWarmUpTask.class, "MSG_Refresh_Suspend"));
260
                            h.suspend(NbBundle.getMessage(MenuWarmUpTask.class, "MSG_Refresh_Suspend"));
261
                        } catch (Throwable t) {
262
                            // ignore any errors
263
                        }
264
                    } else {
260
                    } else {
265
                        EventQueue.invokeLater(this);
261
                        EventQueue.invokeLater(this);
266
                    }
262
                    }

Return to bug 186636