jdk/test/javax/swing/JEditorPane/bug4714674.java
author serb
Tue, 12 Nov 2013 20:24:25 +0400
changeset 21596 0e3a39f29dbc
parent 409 eaa6e0cc0aea
child 23010 6dadb192ad81
permissions -rw-r--r--
8027696: Incorrect copyright header in the tests Reviewed-by: alanb, malenkov, mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21596
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
     1
/*
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
     2
 * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
     4
 *
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
     7
 * published by the Free Software Foundation.
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
     8
 *
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    13
 * accompanied this code).
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    14
 *
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    18
 *
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    21
 * questions.
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    22
 */
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 409
diff changeset
    23
409
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    24
/* @test
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    25
   @bug 4714674
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    26
   @summary Tests that JEditorPane opens HTTP connection asynchronously
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    27
   @author Peter Zhelezniakov
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    28
   @run main bug4714674
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    29
*/
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    30
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    31
import javax.swing.*;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    32
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    33
import com.sun.net.httpserver.HttpExchange;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    34
import com.sun.net.httpserver.HttpHandler;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    35
import com.sun.net.httpserver.HttpServer;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    36
import java.io.IOException;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    37
import java.net.InetSocketAddress;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    38
import java.util.concurrent.Executors;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    39
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    40
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    41
public class bug4714674 {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    42
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    43
    public static void main(String[] args) throws Exception {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    44
        new bug4714674().test();
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    45
    }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    46
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    47
    private void test() throws Exception {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    48
        final DeafServer server = new DeafServer();
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    49
        final String baseURL = "http://localhost:" + server.getPort() + "/";
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    50
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    51
        SwingUtilities.invokeLater(new Runnable() {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    52
            public void run() {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    53
                try {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    54
                    JEditorPane pane = new JEditorPane();
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    55
                    ((javax.swing.text.AbstractDocument)pane.getDocument()).
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    56
                            setAsynchronousLoadPriority(1);
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    57
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    58
                    // this will block EDT unless 4714674 is fixed
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    59
                    pane.setPage(baseURL);
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    60
                } catch (IOException e) {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    61
                    // should not happen
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    62
                    throw new Error(e);
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    63
                }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    64
            }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    65
        });
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    66
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    67
        // if 4714674 is fixed, this executes before connection times out
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    68
        SwingUtilities.invokeLater(new Runnable() {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    69
            public void run() {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    70
                synchronized (server) {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    71
                    server.wakeup = true;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    72
                    server.notifyAll();
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    73
                }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    74
                pass();
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    75
            }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    76
        });
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    77
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    78
        // wait, then check test status
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    79
        try {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    80
            Thread.sleep(5000);
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    81
            if (!passed()) {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    82
                throw new RuntimeException("Failed: EDT was blocked");
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    83
            }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    84
        } finally {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    85
            server.destroy();
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    86
        }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    87
    }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    88
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    89
    private boolean passed = false;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    90
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    91
    private synchronized boolean passed() {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    92
        return passed;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    93
    }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    94
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    95
    private synchronized void pass() {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    96
        passed = true;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    97
    }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    98
}
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
    99
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   100
/**
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   101
 * A "deaf" HTTP server that does not respond to requests.
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   102
 */
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   103
class DeafServer {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   104
    HttpServer server;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   105
    boolean wakeup = false;
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   106
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   107
    /**
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   108
     * Create and start the HTTP server.
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   109
     */
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   110
    public DeafServer() throws IOException {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   111
        InetSocketAddress addr = new InetSocketAddress(0);
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   112
        server = HttpServer.create(addr, 0);
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   113
        HttpHandler handler = new DeafHandler();
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   114
        server.createContext("/", handler);
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   115
        server.setExecutor(Executors.newCachedThreadPool());
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   116
        server.start();
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   117
    }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   118
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   119
    /**
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   120
     * Stop server without any delay.
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   121
     */
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   122
    public void destroy() {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   123
        server.stop(0);
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   124
    }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   125
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   126
    /**
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   127
     * Return actual server port number, useful for constructing request URIs.
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   128
     */
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   129
    public int getPort() {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   130
        return server.getAddress().getPort();
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   131
    }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   132
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   133
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   134
    class DeafHandler implements HttpHandler {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   135
        public void handle(HttpExchange r) throws IOException {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   136
            synchronized (DeafServer.this) {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   137
                while (! wakeup) {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   138
                    try {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   139
                        DeafServer.this.wait();
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   140
                    } catch (InterruptedException e) {
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   141
                        // just wait again
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   142
                    }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   143
                }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   144
            }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   145
        }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   146
    }
eaa6e0cc0aea 4714674: JEditorPane.setPage(url) blocks AWT thread when HTTP protocol is used
peterz
parents:
diff changeset
   147
}