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

(-)a/autoupdate.services/src/org/netbeans/modules/autoupdate/services/OperationSupportImpl.java (-2 / +17 lines)
Lines 60-65 Link Here
60
import org.netbeans.spi.autoupdate.CustomInstaller;
60
import org.netbeans.spi.autoupdate.CustomInstaller;
61
import org.openide.LifecycleManager;
61
import org.openide.LifecycleManager;
62
import org.openide.modules.ModuleInfo;
62
import org.openide.modules.ModuleInfo;
63
import org.openide.util.Mutex.ExceptionAction;
64
import org.openide.util.MutexException;
63
65
64
/**
66
/**
65
 * @author Jiri Rechtacek, Radek Matous
67
 * @author Jiri Rechtacek, Radek Matous
Lines 125-131 Link Here
125
                    UpdateElementImpl impl = Trampoline.API.impl (operationInfo.getUpdateElement ());
127
                    UpdateElementImpl impl = Trampoline.API.impl (operationInfo.getUpdateElement ());
126
                    moduleInfos.addAll (impl.getModuleInfos ());
128
                    moduleInfos.addAll (impl.getModuleInfos ());
127
                }
129
                }
128
                Set<Module> modules = new HashSet<Module>();
130
                final Set<Module> modules = new HashSet<Module>();
129
                for (ModuleInfo info : moduleInfos) {
131
                for (ModuleInfo info : moduleInfos) {
130
                    Module m = Utilities.toModule (info);
132
                    Module m = Utilities.toModule (info);
131
                    if (Utilities.canEnable (m)) {
133
                    if (Utilities.canEnable (m)) {
Lines 137-143 Link Here
137
                    }
139
                    }
138
                }
140
                }
139
                assert mm != null;
141
                assert mm != null;
140
                enable(mm, modules);
142
                final ModuleManager fmm = mm;
143
                try {
144
                    fmm.mutex ().writeAccess (new ExceptionAction () {
145
                        public Object run () throws Exception {
146
                            return enable(fmm, modules);
147
                        }
148
                    });
149
                } catch (MutexException ex) {
150
                    Exception x = ex.getException ();
151
                    assert x instanceof OperationException : x + " is instanceof OperationException";
152
                    if (x instanceof OperationException) {
153
                        throw (OperationException) x;
154
                    }
155
                }
141
            } finally {
156
            } finally {
142
                if (progress != null) {
157
                if (progress != null) {
143
                    progress.finish();
158
                    progress.finish();

Return to bug 149130