Removing anonymous innerclasses the find out what is the actual problem with tests on Solaris test machines editor_settings_90403_base
authorjtulach@netbeans.org
Wed, 20 Dec 2006 13:16:22 +0000
changeset 2499901656a3707
parent 248 ee8653ffc6d9
child 250 eabfb28b44a9
Removing anonymous innerclasses the find out what is the actual problem with tests on Solaris test machines
openide.util/src/org/openide/util/Mutex.java
     1.1 --- a/openide.util/src/org/openide/util/Mutex.java	Tue Dec 19 16:54:28 2006 +0000
     1.2 +++ b/openide.util/src/org/openide/util/Mutex.java	Wed Dec 20 13:16:22 2006 +0000
     1.3 @@ -1210,23 +1210,24 @@
     1.4  
     1.5          try {
     1.6              final List<T> res = new ArrayList<T>(1);
     1.7 -            EventQueue.invokeAndWait(
     1.8 -                new Runnable() {
     1.9 -                    public void run() {
    1.10 -                        try {
    1.11 -                            res.add(run.run());
    1.12 -                        } catch (Exception e) {
    1.13 -                            arr[0] = e;
    1.14 -                        } catch (LinkageError e) {
    1.15 -                            // #20467
    1.16 -                            arr[0] = e;
    1.17 -                        } catch (StackOverflowError e) {
    1.18 -                            // #20467
    1.19 -                            arr[0] = e;
    1.20 -                        }
    1.21 +            class AWTWorker implements Runnable {
    1.22 +                public void run() {
    1.23 +                    try {
    1.24 +                        res.add(run.run());
    1.25 +                    } catch (Exception e) {
    1.26 +                        arr[0] = e;
    1.27 +                    } catch (LinkageError e) {
    1.28 +                        // #20467
    1.29 +                        arr[0] = e;
    1.30 +                    } catch (StackOverflowError e) {
    1.31 +                        // #20467
    1.32 +                        arr[0] = e;
    1.33                      }
    1.34                  }
    1.35 -            );
    1.36 +            }
    1.37 +            
    1.38 +            AWTWorker w = new AWTWorker();
    1.39 +            EventQueue.invokeAndWait(w);
    1.40  
    1.41              if (arr[0] == null) {
    1.42                  return res.get(0);