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 97628
Collapse All | Expand All

(-)core/src/org/netbeans/core/WarmUpSupport.java (-1 / +7 lines)
Lines 19-24 Link Here
19
19
20
package org.netbeans.core;
20
package org.netbeans.core;
21
21
22
import java.util.Random;
22
import java.util.logging.Level;
23
import java.util.logging.Level;
23
import java.util.logging.Logger;
24
import java.util.logging.Logger;
24
import org.netbeans.core.startup.StartLog;
25
import org.netbeans.core.startup.StartLog;
Lines 71-80 Link Here
71
            }
72
            }
72
        }
73
        }
73
        else {
74
        else {
75
            Random rand = new Random();
74
            for (int i = 0; i < warmObjects.length; i++) {
76
            for (int i = 0; i < warmObjects.length; i++) {
75
                try {
77
                try {
76
                    InstanceCookie ic = (InstanceCookie) warmObjects[i].getCookie(InstanceCookie.class);
78
                    InstanceCookie ic = warmObjects[i].getCookie(InstanceCookie.class);
77
79
80
                    assert rand.nextInt(5) > 0: "Deliberately skipping run of warmup task "+warmObjects[i];
78
                    if (willLog) {
81
                    if (willLog) {
79
                        StartLog.logProgress("Warmup running " +
82
                        StartLog.logProgress("Warmup running " +
80
                                             ic.instanceName());
83
                                             ic.instanceName());
Lines 84-89 Link Here
84
                    if (warmer instanceof Runnable) {
87
                    if (warmer instanceof Runnable) {
85
                        ((Runnable) warmer).run();
88
                        ((Runnable) warmer).run();
86
                    }
89
                    }
90
                }
91
                catch (AssertionError ae) { // NOPMD
92
                    Logger.global.log(Level.INFO, ae.getMessage());
87
                }
93
                }
88
                catch (Exception ex) {
94
                catch (Exception ex) {
89
                    Logger.getLogger(WarmUpSupport.class.getName()).log(Level.WARNING, null, ex);
95
                    Logger.getLogger(WarmUpSupport.class.getName()).log(Level.WARNING, null, ex);

Return to bug 97628